Hi There, Could some one advice, how can i got only one/Unique marker on google map v3. All previous markers should be removed when i create new makrer on map.
Thanks
Hi There, Could some one advice, how can i got only one/Unique marker on google map v3. All previous markers should be removed when i create new makrer on map.
Thanks
You need to keep track (an array) of all the marker objects on your map. You need to iterate through them, setting their map
property to null
. From the docs:
To remove a marker, call the setMap() method passing null as the argument.
http://code.google.com/apis/maps/documentation/v3/overlays.html#Markers