The only method that removes markers from map is clear. However it clears all markers from the map.
I want to remove only single marker or group of markers.
How could i achieve this?
You can delete the markers by removing them from the map and then setting the array's length to 0 , which removes all references to the markers.
The non-permanent ink can be wiped off using a damp cloth, but your markings may not survive a rain storm. The permanent ink will easily survive getting wet, but minor erasures can be made with a plastic eraser, and the sheet can be wiped clean with a cloth dampened with alcohol.
Use this line: googleMap. clear(); and after add new marker on Google map.
After adding the marker it is possible to obtain its reference:
Marker marker = map.addMarker(..);
The Marker
class has a remove
method:
I got the same problem, so to fix it I'm doing
mMap = super.getMap(); map.clear();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With