MBTile及其图层问题

时间:2014-08-02 08:15:27

标签: ios mbtiles

我正在使用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新手。请帮帮我

0 个答案:

没有答案