DEPRECATED-mapbox-ios-sdk
DEPRECATED-mapbox-ios-sdk copied to clipboard
zoomLevel and maxZoomLevel don't work in RMMapView initWithFrame:andTilesource:centerCoordinate:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:
In RMMapView's initWithFrame:andTilesource:centerCoordinate:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:initWithFrame:andTilesource:centerCoordinate:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage: zoom and maxZoom are set to 19 no matter what you're setting them to. Here's my code
RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds
andTilesource:mapSource
centerCoordinate:CLLocationCoordinate2DMake(54.876607, 53.761597)
zoomLevel:3
maxZoomLevel:4
minZoomLevel:2
backgroundImage:nil];
Works fine if I add these lines:
[mainMapView setZoom:3];
[mainMapView setMaxZoom:4];
Same here. Using mapbox sdk 1.1.0.
Solution: set the max/min limit after adding the map to the view structure.