DEPRECATED-mapbox-ios-sdk
DEPRECATED-mapbox-ios-sdk copied to clipboard
minZoomLevel for RMAnnotation
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.
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.
+1 for this