I have followed the the tutorials on this matter and also checked the information on:
https://developers.google.com/maps/do...
however when I try to call a function to remove the markers on a map,nothing happens.What am I doing wrong?
I have followed the the tutorials on this matter and also checked the information on:
https://developers.google.com/maps/do...
however when I try to call a function to remove the markers on a map,nothing happens.What am I doing wrong?
Hi Cristian,
Unfortunatly there is no way to clear all markers without handle them.
But when you have this items (which you want to remove from map) you can remove them with ".setMap(null);" method.
See details details about implementation:
http://stackoverflow.com/questions/15...
So with this implementation when you add marker you need invoke:
pre
markersArray.push(marker);
/pre
And when you need remove all markers you can run following JS:
pre
clearOverlays();
/pre
Regards.
Worked like a charm!
Thank you @ Yurii Orishchuk!