I'm stuck with a navigation issue while using a GPX file to create a route navigation (turn by turn)
My GPX file parsing seems to work since I've managed to build a CLLocation Array.
The problem is that nothing shows up on my Map view. I have no routing delegate callback neither ( with the event :didFinishRouteCalculationWithInfo)
Here is my code :
let path: String = NSBundle.mainBundle().pathForResource(fileName, ofType: "gpx")!
do {
let root: SKGPSFileElement = try SKGPSFilesService.sharedInstance().loadFileAtPath(path)
let locationArray = SKGPSFilesService.sharedInstance().locationsForElement(root)
let route = SKRouteSettings()
route.shouldBeRendered = true
route.requestAdvices = true
SKRoutingService.sharedInstance().calculateRouteWithSettings(route, customLocations: locationArray)
// I also tried to read directly my SKGPSFileElement :
//SKRoutingService.sharedInstance().calculateRouteWithSettings(route, GPSFileElement: root)
} catch {
}
I tried to get some help with the Swift Skobbler Demo but they also have the issue ... (When selecting the Berlin GPX track for instance, no track appears)
Thank you in advance, I'm desperate :'( !
Okay, once again the demo project missed some lines ... I only had to add these lines to make it work :
SKRoutingService.sharedInstance().navigationDelegate = self
SKRoutingService.sharedInstance().routingDelegate = self
SKRoutingService.sharedInstance().mapView = map
Hope it could help someone :)