问题
I've built a control using the RMMapView. I've also downloaded a map from MapBox to be offline available, and set the minimum and maximum zoom levels accordingly, like this:
RMMapboxSource * tileSource = [[RMMapboxSource alloc] initWithMapID:DEBUG_MAP_ID]; RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:tileSource]; mapView.minZoom = [[[tileSource infoDictionary]objectForKey:@"minzoom"] intValue]; mapView.maxZoom = [[[tileSource infoDictionary]objectForKey:@"maxzoom"] intValue]; [mapView setZoom:mapView.minZoom animated:YES]; mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; mapView.adjustTilesForRetinaDisplay = YES; [mapView setHideAttribution:YES]; [self.view addSubview:mapView];
All good, but once I start zooming out, it seems like the min-zoom level is not honoured, no matter what I set it to, and the map disappears because it doesn't have tiles for that level.
Is there anything I'm missing here? The values in the dictionary are good, the zoom levels are set correctly. This applies to both the min-and max zoom, neither of them seem to have effect.
(On a quick side-note, I could not find a developer forum for MapBox. They do have a support-page, but it comes down to FAQ, e-mail us or pay for support. Is the best go-to place for these issues StackOverflow?)
回答1:
I answered you on support email, but try changing the mapView
properties after you've added it to the view hierarchy.
回答2:
I wish I could answer your zooming question, but to answer part 2, this seems like the only forum for mapbox right now. I too am brand new to it and having a hard time finding answers
来源:https://stackoverflow.com/questions/22017634/mapbox-zoom-level-not-honored