ios - Mapbox 错误 RMConfiguration setaccesstoken

标签 ios mapbox

我在运行示例时遇到此错误:

"No visible @interface for 'RMConfiguration' declares the selector 'setAccessToken:'"

有什么想法吗?代码可能是什么原因造成的?我使用的是 1.4.1 版本的 SDK

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [[RMConfiguration configuration] setAccessToken:@"<access token>"];
    RMMapboxSource *tileSource = [[RMMapboxSource alloc] initWithMapID:@"examples.map-zr0njcqy"];
    RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:tileSource];
    [self.view addSubview:mapView];
}

最佳答案

根据 changelog , 这被暂时删除了。尝试 develop 分支,或者仅通过提供 mapID 来使用 v3 API。

关于ios - Mapbox 错误 RMConfiguration setaccesstoken,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26894522/

相关文章:

android - 自定义 Mapbox fragment 信息布局

javascript - React-Native Mapbox 不显示用户位置和注释

ios - 无法完成购买非续订订阅交易

android - 推送通知提供商如何通过选择推送给用户?

ios - 如果 NSURLCache 满了会发生什么?

javascript - 如何在 React js 中更改 mapbox-gl 的中心纬度和经度?

flutter - 将可拖动标记添加到 flutter 应用程序 Mapbox

amazon-s3 - 访问 aws s3 存储桶以暂存 Mapbox 切片集文件

iOS UI 测试与集成测试

ios - xcode-我想接收设备语言