-2

I am creating a map application using GoogleMap. I have a problem while moving a CustomMarker from first to second location with help of location change listener. CustomMarker gets duplicated because its maintaining the older position as well while updating to new location. Please refer the below image.

Duplication of single custom marker

DawidJ
  • 1,239
  • 12
  • 19

1 Answers1

-1

Why won't you just clear() GoogleMap in order to remove old marker?

https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.html#clear()

DawidJ
  • 1,239
  • 12
  • 19