Pitfall #3: http://econym.org.uk/gmap/basic1.htm
You are not obtaining function closure on the markers. http://econym.org.uk/gmap/closure.htm -- Marcelo - http://maps.forum.nu -- On Dec 28, 1:38 am, Neophyte <[email protected]> wrote: > Hello All! > > I've just done my first google map and am very happy with the result. > > Link to my map is > here:http://www.koisis.com/.clients/sangat/dev/index.php?cmd=02.05.00 > > Link to my .js file is > here:http://www.koisis.com/.clients/sangat/dev/+features/googmaps/assets/j... > > The only problem I have is that - as you can see from the link - I > have implemented six custom markers on this map for six different > locations on this island but each of the six markers is only using one > of the markers. > > It's as if each new GIcon() is overwriting the var of the previous one > until it hits the last GIcon(). That would make sense if I mistakenly > had var myIcon = new GIcon() for each of my custom markers, but I > don't - the various properties of each custom marker is being assigned > to a different var, i.e.: > > var icnRes = new GIcon(); > var icnHot= new GIcon(); > var icnRob = new GIcon(); > ... and so on. > > I've combed the code and combed the code but I can't see the error of > my ways. > > I'm pretty new to Javascript, so could someone please show me the > error of my ways? > > Huge appreciation to all in advance! -- 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.
