Skip to content Skip to sidebar Skip to footer

How To Remove Marker From Google Map V2?

I have an alerdialog that pops up when tapping on the marker with two options, on of the options are to remove the marker. Now this works perfectly, except the user taps on the r

Solution 1:

Your marker.remove() code does not work?

Or say what is your actual problem?

set All markder within a variable like

HashMap<Integer, Marker> myMarkersHash = new HashMap<Integer, Marker>();

and put marker value

myMarkersHash.put(IndexValue, marker);

and to show/Hide marker use this code

    myMarkersHash.get(IndexValue).setVisible(false);
// or
   myMarkersHash.get(IndexValue).setVisible(true);

Post a Comment for "How To Remove Marker From Google Map V2?"