Balaji G
Balaji G

Reputation: 673

GMSMarker hide/show in GMSMapView in iOS

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.

Upvotes: 0

Views: 2153

Answers (1)

Shubham
Shubham

Reputation: 88

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

Upvotes: 3

Related Questions