首页 / 浏览问题 / 移动GIS / 问题详情
RMMapContents初始化崩溃
匿名
2017年08月14日

iClient for iOS 

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

 

2 个回答

您好,同一问题请不要重复提问,会有工作人员为您解答,请耐心等待。
4,524EXP 2017年08月14日
需要提供代码和更多的调试信息
186EXP 2017年08月14日

代码

    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];接口

...