RMMapContents初始化崩溃

0 投票
100 浏览

iClient for iOS 

RMMapContents 调用 initWithView: 方法崩溃提示 '-[RMOpenStreetMapSource m_dScales]: unrecognized selector sent to instance 0x17422e4c0'   RMOpenStreetMapSource 没有  m_dScales 方法,请问如何解决? 谢谢

 

最新提问 8月 14, 2017 分类:  100次浏览 | 用户: hfyl1992 (0 分)
重新分类 8月 14, 2017 用户:李熙y

2 个回答

0 投票
您好,同一问题请不要重复提问,会有工作人员为您解答,请耐心等待。
最新回答 8月 14, 2017 用户: 李熙y 名扬四海 (2,730 分)
0 投票
需要提供代码和更多的调试信息
最新回答 8月 14, 2017 用户: 孔祥 牛刀小试 (161 分)

代码

    UIScreen *screen = [UIScreen mainScreen];

    _mapView = [[RMMapView alloc]initWithFrame:screen.bounds screenScale:screen.scale];

    _mapView.delegate = self;

    [self.view addSubview:_mapView];

    RMMapContents *aMapContents = [[RMMapContents alloc]initWithView:_mapView screenScale:screen.scale];

    SMTianDiTuTileSource *titleSource = [[SMTianDiTuTileSource alloc]init];

    [aMapContents addTileSource:titleSource atIndex:1];

调试信息

logged method call: -[MapView at 0,0-0,0 initWithFrame:screenScale:] (line 112)
logged method call: -[MapView at 0,0-414,736 performInitialSetup] (line 80)
logged method call: -[<RMMapContents: 0x17016c540> initWithView:screenScale:] (line 100)
logged method call: -[<RMMapContents: 0x17016c540> initWithView:tilesource:centerLatLon:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:screenScale:] (line 150)
logged method call: -[MapView at 0,0-414,736 performInitialSetup] (line 80)
-[RMOpenStreetMapSource m_dScales]: unrecognized selector sent to instance 0x17403a2a0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RMOpenStreetMapSource m_dScales]: unrecognized selector sent to instance 0x17403a2a0'
*** First throw call stack:
(0x191cd6fe0 0x190738538 0x191cddef4 0x191cdad54 0x191bd6d4c 0x100258a60 0x100258718 0x1000ddf14 0x1000dd4e0 0x197e08b04 0x197e20590 0x197fa4e18 0x197ebf7bc 0x197ebf424 0x197ebf388 0x197e05cc0 0x194ff6274 0x194feade8 0x194feaca8 0x194f6634c 0x194f8d3ac 0x194f8de78 0x191c849a8 0x191c82630 0x191c82a7c 0x191bb2da4 0x19361d074 0x197e6dc9c 0x1000f78e8 0x190bc159c)
libc++abi.dylib: terminating with uncaught exception of type NSException

尝试使用 aMapContents = [[RMMapContents alloc] initWithView:mapView tilesource:xxxx];接口

...