I want to clear a marker on Google Maps.
What is the difference between marker.setVisible(false) and marker.setMap(null)?
But I don
Another key distinction is that setMap(NULL) releases the resources associated with the marker whereas setVisible(false) just makes the marker invisible, but the resources associated with the marker are still allocated.
If you're dealing with 100s or 1000s of markers, this can become a significant performance and memory issue.