PDA

View Full Version : Having a problem getting Free drive to work



outbacktouring
30.06.2015, 04:45
We have set our project/app to run in Real mode, however when the user taps 'Start Free Drive' the app seems to revert to simulation mode and not run the free drive showing correct location and speed.
Normal navigation with a route runs fine.

dandronic
30.06.2015, 15:59
I'm not sure I understand - in theory the free drive inside the demo projects (the Car navigation UI demo) should automatically enter "simulation mode" by replaying a set of prerecorded positions (from a log file).

Is this your problem? That the system is entering simulation mode when pressing free drive? If yes - just look for the
self.configuration.navigationType = SKNavigationTypeSimulationFromLogFile; calls (or similar) and remove them.

If this does not answer your question, could you please detail what your desired output should be and what the actual output is?

outbacktouring
01.07.2015, 02:11
In our app we are using map in the offline mode so we have set connectivity mode to offline and are using pre bundled map files. We have used only NavigationTypeReal as the default mode and in both Real and Simulation once a user taps the Start Free Drive Button in Navigation the app goes to Free Drive but does not track the user position or the speed. Our code for FreeDrive button click is :-
- (void)freeDriveButtonClicked {
_menu.navigationStyle = YES;
if (self.configuration.navigationType == SKNavigationTypeReal) {
_menu.showSpeedbuttons = NO;
} else {
_menu.showSpeedbuttons = YES;
}

_centerButton.hidden = YES;
_longTapInfoLabel.hidden = YES;
_menu.frameY = 140 * kSizeMultiplier;

if (self.configuration.routeType == SKRoutePedestrian) {
self.configuration.navigationType = SKNavigationTypeSimulationFromLogFile;
self.configuration.simulationLogPath =
[[NSBundle mainBundle] pathForResource:@"Seattle" ofType:@"log"];
}

[self removeAnnotations];
[self.navigationManager startFreeDriveWithConfiguration:self.configuration];
self.navigationManager.mainView.hidden = NO;
self.navigationManager.mainView.isUnderStatusBar =
[UIDevice majorSystemVersion] >= 7;
self.navigationController.navigationBarHidden = YES;
// [self menuButtonClicked];
}

outbacktouring
01.07.2015, 10:52
Thanks, that fixed it. Brilliant support once again from skobbler. Appreciate it.

dandronic
01.07.2015, 13:39
We're glad to hear that you've found the issue :)