SKMaps crashes when add SKViaPoint

孤街醉人 提交于 2020-02-29 05:10:34

问题


I'm using SKMaps to simulate custom routes. It was working fine with navigating a point to another point, I mean use start and destination only:

route.startCoordinate = CLLocationCoordinate2DMake(37.9667, 23.7167)
route.destinationCoordinate = CLLocationCoordinate2DMake(37.9677, 23.7567)

but if I add viaPoints to route, app will crash when I startNavigation:

route.startCoordinate = CLLocationCoordinate2DMake(37.9667, 23.7167)
route.viaPoints = [SKViaPoint(1, withCoordinate:CLLocationCoordinate2DMake(37.9672, 23.7367))]    
route.destinationCoordinate = CLLocationCoordinate2DMake(37.9677, 23.7567)

Here is the only log I got:

libc++abi.dylib: terminating with uncaught exception of type std::length_error: vector

If anyone saw it before or know how to fix it, please help me.

Thank you.


回答1:


It was a bug in 2.5.1, that is fixed now. You can get the new build from here: forum.skobbler.com/showthread.php/7315-SKViaPoint-crashes-FIXED



来源:https://stackoverflow.com/questions/33513347/skmaps-crashes-when-add-skviapoint

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!