I have the following code to add Overlay
myMapView.getOverlays().add(sites); myMapView.invalidate();
I also have the following delete code, where sites are a global variable.
if (sites != null) { // myMapView.getOverlays().clear(); myMapView.getOverlays().remove(sites); myMapView.invalidate(); sites = null; }
Sometimes I leave duplicates, so I would like to remove all overlays from the map, is this possible?
source share