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);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…