【问题标题】:Mapbox maps - offline tiles cache for iosMapbox 地图 - 用于 ios 的离线切片缓存
【发布时间】:2014-04-17 13:35:33
【问题描述】:

我正在使用 mapbox SDK,试图缓存 mapbox 街道地图图块(不是 MBTiles)。我尝试使用 this thread 中的代码但没有成功 - 我正在为 *tileSource 获取 null

NSString *fullPath = [[NSBundle mainBundle] pathForResource:@"mapbox" ofType:@"json"];
NSString *tileJSON = [NSString stringWithContentsOfFile:fullPath encoding:NSASCIIStringEncoding error:nil];
RMMapboxSource *tileSource = [[RMMapboxSource alloc] initWithTileJSON:tileJSON];

我找不到任何其他类似的代码示例。

一般来说,我需要做的是缓存特定区域的切片,然后在几周后就可以使用它。

任何代码示例或指向正确方向的代码都可以挽救生命!

【问题讨论】:

    标签: ios objective-c mapbox tilecache


    【解决方案1】:

    您确定您的fullPathtileJSON 也不是nil 吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-16
      • 2011-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多