我正在使用MapBox SDK,我已经生成了我的.mbtiles文件。 但是当我使用它与RMMapView时,它只能加载一些它们。为什么不加载所有瓷砖? 例如,zoomlevel 0中应该有16个tile,但我只能看到2个。
- (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.
}
答案 0 :(得分:0)
您是如何生成MBTiles文件的?您是否在其他客户端尝试过,例如上传到mapbox.com?您还可以在RMMBTilesSource
中设置断点,以查看是否正在加载切片。