Thanks Andrew I used Ralph's code which replaced the GPoint reference as you observed. I had just copied Mike's code which uses GPoint. After I added a doctype and removed an extra } the map worked with the icon markers showing.
I have had trouble with Frontpage 2002 recently (possibly because of upgrading to IE8) and I only use it now editing my existing websites. My new websites are made using EXW 2 now. Thanks once again for getting me started! On Jul 28, 2:19 pm, Andrew Leach <[email protected]> wrote: > On Jul 28, 1:56 pm, Geoff <[email protected]> wrote: > > > Thanks Andrew > > > I have been to Mike's site and added the code to my website page. I > > included the function he used from his example page but no matter > > where I seem to put it the map wouldn't work any longer. The geocode > > is correct for the two markers. I have now left the function in but > > commented it out. > > Commenting out a function has no effect if you don't actually call it. > You don't call it! You have > var point = new GPoint(51.33892341204783, -2.310519218444824); > GEvent.addListener(marker, "click", function() { > marker.openInfoWindowHtml("Galleries Shop"); > }); > map.addOverlay(marker); > > without ever actually creating "marker". Consequently your code fails > because you are telling the API to add a listener to something you > haven't created. > > You should be doing something like > var point = new GLatLng(51,-2); > // note the order of Lat and Lng, it's not the same as GPoint > // create a marker at "point" with some infoWindow text > var marker = createMarker(point, "Galleries Shop"); > // and add it to the map > map.addOverlay(marker); > > Currently you have fallen into Pitfall Number Three in Mike's tutorial > page and even if your markers were created your infoWindows wouldn't > work correctly because of that. And they would be in the wrong place > because you have used GPoint instead of GLatLng. > > You also have three <body> tags, which will cause problems because > there is no guarantee which one any particular browser will see as the > "real" one. I'm a little surprised FrontPage allows that to happen, > but then it is by Microsoft... > > <html> > <head> > <title>...</title> > </head> > <body> > ... > </body> > </html> > > By the way, fourteen decimal places goes down to nanometres. Five or > six is plenty. > > Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
