Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove all GMSMarker from GMSMapView?

I placed 100 GMSMarkers on GMSMapView. How to remove all the GMSMarkers?

In Google Sdk Version 1.6 for iOS.

Marker array(in GMSMapView (Overlays) file) which will be holding the GMSMarkers list is deprecated. By using this i was removing all GMSMarker from GMSMapView.

Is there any other way to remove all GMSMarker from GMSMapView in iOS?

like image 459
user3021529 Avatar asked Nov 22 '13 11:11

user3021529


1 Answers

Use [mapView clear] to achieve required functionality. :-)

Update:

Swift:

mapView.clear()
like image 87
Waleed Mahmood Avatar answered Oct 05 '22 22:10

Waleed Mahmood