DEPRECATED-mapbox-ios-sdk icon indicating copy to clipboard operation
DEPRECATED-mapbox-ios-sdk copied to clipboard

minZoomLevel for RMAnnotation

Open chrisballinger opened this issue 11 years ago • 2 comments

It would be extremely useful if you could set a minZoomLevel for an RMAnnotation and have the RMMapView automatically handle showing/hiding annotations at certain zoom levels.

chrisballinger avatar Aug 14 '14 02:08 chrisballinger

That's a pretty cool idea. I'd take a PR for it; looks like you'd just have to find the three or so instances of this:

annotation.layer = [_delegate mapView:self layerForAnnotation:annotation];

Such as:

https://github.com/mapbox/mapbox-ios-sdk/blob/5b52bb307aca918320bdc7b766fce4d946a95796/MapView/Map/RMMapView.m#L3148

And check a property of the annotation first.

At the same time, it'd probably make sense to refactor those 2-3 instances into a single route which could do this in one place.

incanus avatar Aug 14 '14 18:08 incanus

+1 for this

albertschulz avatar Sep 22 '14 14:09 albertschulz