On Oct 20, 6:26 pm, Carrie <[email protected]> wrote: > Anyway, the issue I'm having is, I want the address marker to > disappear when a new address is entered. Right now, it continues > adding new markers.
OK, well, don't create a new marker on every geocode request. Make the var marker global, just like var map, at the top of the script. Immediately after you create the GMap2 object and setCenter, create the marker with any GLatLng, addOverlay() it and hide it immediately with marker.hide(). Then, on each successful geocode request simply move the marker to the new location with marker.setLatLng() and show it with marker.show(). -- Marcelo - http://maps.forum.nu -- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
