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

zoomLevel and maxZoomLevel don't work in RMMapView initWithFrame:andTilesource:centerCoordinate:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:

Open alyapozdnyakova opened this issue 12 years ago • 1 comments

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];

alyapozdnyakova avatar Sep 27 '13 08:09 alyapozdnyakova

Same here. Using mapbox sdk 1.1.0.

Solution: set the max/min limit after adding the map to the view structure.

gearoidoceallaigh avatar Feb 14 '14 10:02 gearoidoceallaigh