In Google Maps API v2, if I wanted to remove all the map markers, I could simply do:
map.clearOverlays();
How do I do this in Google Maps A
You can do it this way too:
function clearMarkers(category){ var i; for (i = 0; i < markers.length; i++) { markers[i].setVisible(false); } }