On Feb 20, 8:49 am, "[email protected]" <[email protected]> wrote: > On Feb 20, 4:51 am, phlexish <[email protected]> wrote: > > > I am very new to this... > > > Having problems adding a marker with a info window but then be able to > > remove the marker by right clicking it if needed, so far it seems I > > have it all working but when I right click on the marker it only gets > > rid of the info window then starts popping up info windows on other > > markers when i click it. > > > Heard something about arrays but I am not too familia with them the > > way I want to do this. Would someone be so kind as to tell me my > > errors? > > > Link:http://libertine.gamers.net.nz/dump/map.php > > If you want the infoWindow to stay associated with the marker, one way > of doing it would be to use function closure as described in Mike > Williams' tutorial (not easy to understand, but not too hard to use). > make a createMarker function that holds function closure on the > infoWindow. > > The Basics > Part 1 Markers with info windowshttp://econym.org.uk/gmap/basic1.htm > > and > Javascript Concepts > Part 3 Function Closurehttp://econym.org.uk/gmap/closure.htm > > Not an easy topic.
Here is a modified version of your map: http://www.geocodezip.com/libertine_gamers_net_nz_mapB.html It uses a createMarker function to get function closure on the markers and fixes the problem you had with your singlerightclick event listener, the arguments were wrong, see the documentation: http://code.google.com/apis/maps/documentation/reference.html#GMap2.singlerightclick -- Larry -- 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.
