MGLMapView.minimumZoomLevel is not working.
Platform: iPhone 7 - iOS 11.1.1
Mapbox SDK version: 3.7.0
Steps to trigger behavior
- Run the following code.
- (void)viewDidLoad {
[super viewDidLoad];
MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) styleURL:[MGLStyle satelliteStreetsStyleURL]];
mapView.maximumZoomLevel = 15;
mapView.minimumZoomLevel = 10;
mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
// Set the map’s center coordinate and zoom level.
[mapView setCenterCoordinate:CLLocationCoordinate2DMake(59.31, 18.06)
zoomLevel:9
animated:NO];
[self.view addSubview:mapView];
}
Expected behavior
NSLog(@"%@", @(mapView.minimumZoomLevel)); -> 10
Actual behavior
NSLog(@"%@", @(mapView.minimumZoomLevel)); -> 0
On the other hand, mapView.maximumZoomLevel can be set value correctly.
I have the same problem with the same version.
Fixed in https://github.com/mapbox/mapbox-gl-native/pull/10596
I fixed that in https://github.com/mapbox/mapbox-gl-native/pull/10596 will be shipped in our next release. I apologize for any inconvenience.
I sincerely appreciate your prompt handling! We are awaiting your next release.