Well, i don't really have a strategy for storing my markers now. I just put them on the map one at a time.
I see now that i might need to use some kind of an array for managing my markers. What would be a good way to do this? Appreciate it if you had any examples, url perhaps. 2009/1/26 [email protected] <[email protected]> > > On Jan 25, 2:10 pm, terje <[email protected]> wrote: > > Hi guys. > > > > I'm new to the google maps api but i'm trying to learn. > > > > I have managed to get it working and set it up so that users can click > > on the map and add a marker. When the user completes a small form, the > > info is sent via ajax to my server and stored there. That is now > > working. > > > > Problem occurs when i want my users to delete the markers. My first > > thought was to add a link in the markers info window and that link > > would call a script to remove the marker. > > > > But how can i get a reference to which marker the user wants to remove? > > How do you store your markers? > If they are an array, you can use the marker click handler to set a > global variable that contains the index of the marker which currently > has an openInfoWindow. > > -- 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 -~----------~----~----~----~------~----~------~--~---
