0

I'm having a strange behavior with my markers in android maps v2.

I have a method that change the marker's icon for another when I click on a dialog button.

When the method ends, the icon changes but the old icon are still on the map.

I have noticed that when I changed the marker's shape. Here are some images to helping you understand

I tried calling remove() and adding the marker again, but no luck =(

Image 1 Image 2

1 Answers1

0

May this could Marker.setVisible(boolean) work or

you could check this also Remove previous Marker and add new Marker in Google Map v2

Community
  • 1
  • 1
prat
  • 597
  • 8
  • 17
  • I tried both methods but no luck. And else, I have a custom marker click listener, that isn't called anymore when removing and adding a new marker. – Le Compañero Oct 22 '15 at 16:30
  • Ok, I figured out what happened. I call a method that add the markers twice. This answer helped me http://stackoverflow.com/questions/16538278/marker-is-not-removing-from-mapv2-android – Le Compañero Oct 22 '15 at 17:15