Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Clickable map

nono, first code was fine. Don't copy paste all of the code, just this:

CodeDownload  
marker = new PdMarker(new GLatLng(50.2024662,54865309));
marker.setTooltip("Stockholm";
var html = "VISIT <a href='http://www.website.com/' target='_blank'>website<\/a>, OR MORE INFO";
marker.setDetailWinHTML(html);
marker.setHoverImage("http://www.google.com/mapfiles/dd-start.png";
map.addOverlay(marker);

Have no acces...

did you upload the pdmarker.js? is the path to this file ok?

give us the final code so I can try it on my site?
Mayby i do something stupid. But i post my api key?.

Here is my final code

Quote

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Google Maps JavaScript API Example - simple</title>
<style type="text/css">
div.markerTooltip, div.markerDetail {
color: black;
font-weight: bold;
background-color: white;
white-space: nowrap;
margin: 0;
padding: 2px 4px;
border: 1px solid black;
}
</style>
<script src="http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAAuGUNpIu80o4A7nB7nwRU2BQVKMIC9fyvuqD00QM8j2WtE_r5BBRACqxJyXRmR3sPAfCksClchrecEQ"
type="text/javascript"></script>
<script type="text/javascript" src="/pdmarker.js"></script>

<script type="text/javascript">
//<![CDATA[
window.onload = onPageLoad;
var map;

function onPageLoad() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(49.28124, -123.12035), 17-5);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
marker = new PdMarker(new GLatLng(49.28124,-123.12035));
marker.setTooltip("Vancouver");
var html = "Visit <a href='http://www.yourvancouver.com'>Vancouver<\/a>";
marker.setDetailWinHTML(html);
marker.setHoverImage("http://www.google.com/mapfiles/dd-start.png");
map.addOverlay(marker);

marker = new PdMarker(new GLatLng(50.2024662,54865309));
marker.setTooltip("Stockholm";
var html = "VISIT <a href='http://www.website.com/' target='_blank'>website<\/a>, OR MORE INFO";
marker.setDetailWinHTML(html);
marker.setHoverImage("http://www.google.com/mapfiles/dd-start.png";
map.addOverlay(marker);

}
}
//]]>
</script>

</head>

<body>
<div id="map" style="width: 500px; height: 500px"></div>
<!-- // define a place for PdMarker to calculate tooltip widths (optional) -->
<div id="pdmarkerwork"></div>
</body>

</html>





And i have download the file to my root.
try this (is the API key allright?
CodeDownload  
<br />
<p>Testpage! U see that you can put tekst notice that one is blinking ;-)
You have to change the starting coordinates and zoom for your own town or place</p>
<br />

<head>
    <title>TITLETITLE</title>
    <style type="text/css">
       div.markerTooltip, div.markerDetail {
          color: white;
          font-weight: bold;
          background-color: black;
          white-space: nowrap;
          margin: 0;
          padding: 2px 4px;
          border: 1px solid black;
          }
    </style>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAuGUNpIu80o4A7nB7nwRU2BQVKMIC9fyvuqD00QM8j2WtE_r5BBRACqxJyXRmR3sPAfCksClchrecEQ"
      type="text/javascript"></script>
<script type="text/javascript" src="../../pdmarker.js"></script>

<script type="text/javascript">
//<![CDATA[
window.onload = onPageLoad;
var map;

function onPageLoad() {
    if (GBrowserIsCompatible()) {
   map = new GMap2(document.getElementById("map"));
   map.setCenter(new GLatLng(52.261434,5.284424), 12-5);
   map.addControl(new GLargeMapControl());
   map.addControl(new GMapTypeControl());
   
       marker = new PdMarker(new GLatLng(52.330396,6.687423));
   marker.setTooltip("Almelo");
   var html = "Bezoek <a href='http://www.survivalteam.nl/' target='_blank'>SAT Outlife<\/a>";
   marker.setDetailWinHTML(html);
   marker.setHoverImage("http://www.google.com/mapfiles/dd-start.png");
   map.addOverlay(marker);
        marker.blink(true,1500); // make this marker blink

       marker = new PdMarker(new GLatLng(52.37316,6.46957));
   marker.setTooltip("Nijverdal");
   var html = "Bezoek <a href='http://www.reggesurvival.nl/' target='_blank'>Survivalgroep Atletics<\/a>";
   marker.setDetailWinHTML(html);
   marker.setHoverImage("http://www.google.com/mapfiles/dd-start.png");
   map.addOverlay(marker);

       marker = new PdMarker(new GLatLng(52.77021,6.24056));
   marker.setTooltip("Havelte");
   var html = "Bezoek <a href='http://www.survivalhavelte.nl/' target='_blank'>Stichting Survival Havelte<\/a>";
   marker.setDetailWinHTML(html);
   marker.setHoverImage("http://www.google.com/mapfiles/dd-start.png");
   map.addOverlay(marker);


    }
}
//]]>
</script>

  </head>

  <body>
    <center><div id="map" style="width: 500px; height: 500px"></div></center>
    <!-- // define a place for PdMarker to calculate tooltip widths (optional) -->
    <div id="pdmarkerwork"></div>
  </body>

Thanks =) Its working now.
Some questions:
How do i change the starting position? (The place you see when u open map)
How change it to be sattelite standard and not map?
change function

map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(52.261434,5.284424), 12-5);
map.addControl(new GLargeMapControl());
change functions

map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(52.261434,5.284424), 12-5);
map.addControl(new GLargeMapControl());
The map dissaper when i change to this:

Quote

function onPageLoad() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("satellite"));
map.setCenter(new GLatLng(52.261434,5.284424), 12-5);
map.addControl(new GLargeMapControl());
Thread Information
Replies
29 posts
Views
6901 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Martijn78, Craig, NobNob, GMUDuckman, Henrik Brobeck