问题
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