How do I clear all map overlays or tags of Google maps in Android?

I want to clear all map overlays or markers from Google maps and use the following code

if(!mapOverlays.isEmpty())
     {
     mapOverlays.clear();

 }

Who can give me any guidance? If I am wrong, whether I am right or wrong, please provide me with a solution to the problem

If there are any marks, I want the map clean

Any help will be satisfied

resolvent:

mapView.invalidate();

I'd like to update the map. It works normally now. So the whole code looks like

if(!mapOverlays.isEmpty()) 
     { 
     mapOverlays.clear(); 
     mapView.invalidate();

 }

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>