我正在使用MBTiles
用于我的某个应用。客户端给出了1 MBTile
个文件,我需要提取该MBTile文件并获取该MBTile文件中的所有图层以及我需要的图层名称
我正在使用以下代码:
NSURL *url=[NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"myMBTILE" ofType:@"mbtiles"]];
// NSURL *url=[NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"control1" ofType:@"mbtiles"]];
offlineSource=[[RMMBTilesSource alloc]initWithTileSetURL:url ];
mapView = [[RMMapView alloc] initWithFrame:_myView.bounds andTilesource:offlineSource];
mapView.delegate = self;
mapView.zoom = 2;
mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
mapView.adjustTilesForRetinaDisplay = YES; // these tiles aren't designed specifically for retina, so make them legible
[_myView addSubview:mapView];
我是iOS新手。请帮帮我