I have map view in my fragment. I need to refresh map and add different markers based on condition. So, I should remove last markers from map before add new markers.
If you need to remove only the markers, and leave other things such as ground overlay,etc there, use:
marker.remove();
or if you have many:
if(markers!=null&&mMap!=null){ for(int i=0;i
where
List markers = new ArrayList<>();