Ok I think I'm getting there. I updated the code and its entering a pushpin, but its not removing the old pin on a new click.
Am I making any sense? On Wed, Dec 9, 2009 at 10:50 AM, Andrew Leach <[email protected] > wrote: > On Dec 9, 5:43 pm, Andy Idema <[email protected]> wrote: > > I just want to display a pin when they click as a visual cue to the user. > > If they click again, I want a new pin in the new click location and the > old > > pin removed. > > > > I'm researching now. > > That's straightforward. > > Declare a global variable, say "mapMarker" > > When the map is clicked, > if mapMarker exists, remove it; > create a marker called mapMarker and add it to the map. > > Or (more efficiently) > > When the map is clicked, > if mapMarker doesn't exist, create it and add it to the map; > else use mapMarker.setLocation to move it to the click location. > > 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]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > > -- 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.
