GMSMarker hide/show in GMSMapView in iOS

2.1k views Asked by At

I used google map sdk for my iOS Application. Here I want to perform GMSMarker hide/show functionality based on the GMSMapView zoom in/zoom out.

Could anyone guide me in correct solution please.

1

There are 1 answers

0
Shubham On

You can add UIPinchGestureRecognizer on your map view.

mapView_.gestureRecognizers = @[ /*add your UIPinchGestureRecognizer instance here*/]; 

Then in its selector method you can hide/show the marker using:

 marker.map = nil; //To hide
 marker.map = mapView_; //To show