PDA

View Full Version : iOS: Simulation for turn by turn navigation with custom gpx files



Ivaylo
07.12.2014, 01:04
Hi,

I'm building a pedestrian navigation app and I need to debug some actions at specific places and POI. I need to calculate a route between two points on the map and let the turn by turn navigation navigate me to the "destinationCoordinate".
I discovered the option "navSettings.navigationType=SKNavigationTypeSimulat ion;".
The problem with this option is that the speed of the simulation is to fast. Can I reduce it somehow?

In Xcode you can edit your "Scheme" of the app and insert a custom.gpx file with coordinates. When you build the application, the gps pointer moves along the coordinates in the .gpx file. This works perfectly in Skobbler with calculated routes on the map but not with turn by turn navigation, even when I use this "navSettings.navigationType=SKNavigationTypeReal;".

Is there a solution or best practice for such a use case?

Thank you,
Ivaylo

dandronic
08.12.2014, 09:11
Hi Ivaylo,

For the simulation speed see decreaseRouteSimulationSpeed (http://developer.skobbler.com/docs/ios/2.3.0/Classes/SKPositionerService.html#//api/name/decreaseRouteSimulationSpeed:)

For your second question: from the description I'm not sure what the issue is (what is happening in a tbt navigation that's not correct), could you add a screenshot or two illustrating the issue?

Ivaylo
08.12.2014, 18:38
For the simulation speed see decreaseRouteSimulationSpeed (http://developer.skobbler.com/docs/ios/2.3.0/Classes/SKPositionerService.html#//api/name/decreaseRouteSimulationSpeed:)


this method works only when I use SimulationFromLog, correctly?

Can I use such a option/function as well for this:
SKNavigationSettings* navSettings = [SKNavigationSettings navigationSettings];
navSettings.navigationType=SKNavigationTypeSimulat ion;
navSettings.distanceFormat=SKDistanceFormatMetric;
[SKRoutingService sharedInstance].mapView.settings.displayMode = SKMapDisplayMode3D;
[[SKRoutingService sharedInstance]startNavigationWithSettings:navSettings];

Thank you,
Ivaylo