Reputation: 43
I had already try to use googleMap.remove()
and route.remove()
it will remove everything but when I recreate it it will show double markers. How can I remove all markers and polyline and recreate markers and polyline in Android?
Upvotes: 0
Views: 1001
Reputation: 13
Just do one thing polyline.setMap(null)
, which will remove the lines from the google map and please find the below documentation for more clarification:
Upvotes: 0
Reputation: 1018
You clear googleMap and old data list, Example
googleMap.clear();
markerList.clear();
Upvotes: 2