The main component responsible for navigation in Navmii SDK is NMNavigationSevice. You can access an instance of this class via NMSdk' navigationService property:
NMNavigationService *navigationService = [NMSdk sharedInstance].navigationService;
POSITIONING OPTIONS
You can set up the location detection accuracy in meters via locationDetectionAccuracy property. To retrieve user defined CLAuthorizationStatus use locationServicesAuthorizationStatus readonly property. You can allow or disallow location updates when your app is in background mode via allowsBackgroundLocationUpdates BOOL property.
//sets location detection accuracy to 20 meters [[NMSdk sharedInstance].navigationService setLocationDetectionAccuracy:20]; //allows user's location updates in the background mode [[NMSdk sharedInstance].navigationService setAllowsBackgroundLocationUpdates:YES]; //logs out location services authorization status NSLog(@"authorization status - %d", [NMSdk sharedInstance].navigationService.locationServicesAuthorizationStatus);
There is also the gpsStatus property indicating if the SDK accepts GPS signal. GPS status is represented as NMGpsStatus enum taking the following values:
- NMGpsStatusOK
- NMGpsStatusNoSignal
- NMGpsStatusOff
//logs out a message if GPS signal is received by the SDK if ([NMSdk sharedInstance].navigationService.gpsStatus == NMGpsStatusOK) { NSLog(@"GPS signal is received"); }
DEMO ROUTE
Navmii SDK allows you to demonstrate the way the real-time traverse of the route will look like on the screen. When the route is calculated, use startDemoRoute and stopDemoRoute methods. Use isDemoRouteActive BOOL property to find out if the demo route is still in progress.
//starts demo route [[NMSdk sharedInstance].navigationService startDemoRoute]; //stops demo route [[NMSdk sharedInstance].navigationService stopDemoRoute];