Clear markers from Google Map in Android

2019-01-22 10:16发布

I have added map on fragment activity and added several marker using addMarker function, but i am able to remove all markers , I am getting notification for different list of markers,

Now i wants to remove all markers and add new one.

one way to keep all markers in list and remove one by one, (marker.remove())

Is there any better way to clear all marker.

1条回答
Anthone
2楼-- · 2019-01-22 10:50

If you want to clear "all markers, overlays, and polylines from the map", use clear() on your GoogleMap.

查看更多
登录 后发表回答