0
我正在使用MapBox SDK,並且我已經生成了我的.mbtiles文件。 但是,當我用RMMapView使用它時,它只能加載其中的一小部分。爲什麼不是所有的瓷磚都被加載? 例如,應該在縮放級別0 16瓦,但我只能看到2iOS7 RMMapView無法加載所有的瓦片
- (void)viewDidLoad
{
[super viewDidLoad];
RMMBTilesSource *offlineSource = [[RMMBTilesSource alloc] initWithTileSetURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"nn" ofType:@"mbtiles"]]];
RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:offlineSource];
// default zoom
mapView.zoom = 0;
// hard code minimal zoom. Try to run in without it to see what happens.
mapView.minZoom = 0;
mapView.maxZoom = 3;
// hide MapBox logo
mapView.showLogoBug = NO;
// hide bottom right "i" icon
[mapView setHideAttribution:YES];
mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
mapView.adjustTilesForRetinaDisplay = YES; // these tiles aren't designed specifically for retina, so make them legible
[self.view addSubview:mapView];
// Do any additional setup after loading the view, typically from a nib.
}