Reputation: 1124
So I want to remove the marker ween it is clicked. I am using this code but nothing happens.
public boolean onMarkerClick(final Marker marker) {
marker.remove();
return true;
}
What am I doing wrong?
Upvotes: 0
Views: 74
Reputation: 1597
Just tested and the remove() works..
map.setOnMarkerClickListener(new OnMarkerClickListener(){
@Override
public boolean onMarkerClick(Marker marker) {
marker.remove();
return true;
}
});
Upvotes: 2