2015-11-04 103 views
1

我正在使用SKMaps來模擬自定義路由。這是工作的罰款與導航一個點到另一個點,我的意思是使用的開始和唯一的目的地:SKMaps在添加SKViaPoint時崩潰

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

,但如果我添加viaPoints路由,應用程序會崩潰,當我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) 

這裏是我得到的唯一日誌:

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

如果有人看到它或知道如何解決它,請幫助我。

謝謝。

+0

我們將對此進行調查。你可以添加你測試過的環境嗎? SDK 2.5.1? – SylviA

+0

是的,我使用的是最新版本2.5.1,xcode 7.它在每個設備上都崩潰了。即使是演示項目(swift)。 –

+0

您還可以添加您用於添加viaPoint數組的代碼嗎? (也許問題出在經過點陣列初始化) – Ando

回答