Navmii SDK
2.2.0
Write yourself a navigation system in iOS
|
Inherits <NSObject>.
Instance Methods | |
(CLAccuracyAuthorization locationServicesAccuracyAuthorizationStatus) | - API_AVAILABLE |
(nullable instancetype) | - NS_UNAVAILABLE |
(void) | - startDemoRoute: |
(void) | - stopDemoRoute |
(NMNavigationInfo *) | - navigationInfo |
(void) | - requestAlwaysAuthorization |
(void) | - requestWhenInUseAuthorization |
(void) | - startUpdatingLocation |
(void) | - stopUpdatingLocation |
(void) | - startUpdatingHeading |
(void) | - stopUpdatingHeading |
(void) | - setCoordinates:course: |
(void) | - setCoordinates:course:speed:horizontalAccuracy:timeStamp:altitude: |
(void) | - snapCoordinates:heading:radiusInMeters:snappingType:completion: |
(NMSnappingResult *) | - snapCoordinates:heading:radiusInMeters:snappingType: |
(void) | - addListener: |
(void) | - removeNavigationServiceListener: |
(void) | - removeListener: |
(void) | - addTrafficOnRouteImageListener: |
(void) | - removeTrafficOnRouteImageListener: |
Class Methods | |
(nullable instancetype) | + NS_UNAVAILABLE |
Properties | |
NMGpsStatus | gpsStatus |
CLLocationAccuracy | locationDetectionAccuracy |
CLAuthorizationStatus | locationServicesAuthorizationStatus |
BOOL | allowsBackgroundLocationUpdates |
BOOL | gpsPositionExtrapolationEnabled |
BOOL | snappingGpsPositionToRoadsEnabled |
NMPosition * | currentPosition |
float | currentCourse |
NMTrackRecorder * | trackRecorder |
BOOL | isDemoRouteActive |
A class providing an API for the SDK's navigation features.
- (void) addListener: | (addListener(listener:)) | NS_SWIFT_NAME |
Adds a listener responding to events described in NMNavigationServiceListener protocol. You can add multiple listeners using this method.
listener | An object conforming to NMNavigationServiceListener protocol to be added to listeners. |
listener | An object conforming to NMNavigationServiceListener protocol to be added to listeners. |
- (void) addTrafficOnRouteImageListener: | (addTrafficOnRouteImageListener(listener:)) | NS_SWIFT_NAME |
Adds a listener responding to events described in NMTrafficOnRouteImageListener protocol. You can add multiple listeners using this method.
listener | An object conforming to NMTrafficOnRouteImageListener protocol to be added to listeners. |
- (CLAccuracyAuthorization locationServicesAccuracyAuthorizationStatus) API_AVAILABLE | (ios(14.0)) |
A value that indicates the level of location accuracy the app has permission to use.
- (NMNavigationInfo *) navigationInfo |
Returns the navigation information.
- (nullable instancetype) NS_UNAVAILABLE |
+ (nullable instancetype) NS_UNAVAILABLE |
- (void) removeListener: | (removeListener(listener:)) | NS_SWIFT_NAME |
Removes a listener responding to events described in NMNavigationServiceListener.
listener | An object conforming to NMNavigationServiceListener protocol to be removed from listeners. |
- (void) removeNavigationServiceListener: | ((deprecated("Use removeListener: instead"))) | __attribute__ |
Removes a listener responding to events described in NMNavigationServiceListener.
listener | An object conforming to NMNavigationServiceListener protocol to be removed from listeners. |
- (void) removeTrafficOnRouteImageListener: | (removeTrafficOnRouteImageListener(listener:)) | NS_SWIFT_NAME |
Removes a listener responding to events described in NMTrafficOnRouteImageListener.
listener | An object conforming to NMTrafficOnRouteImageListener protocol to be removed from listeners. |
- (void) requestAlwaysAuthorization |
When authorization status is not determined, calling this method will trigger a prompt to request "Always" authorization from the user. You must call this method or the requestWhenInUseAuthorization before Navmii SDK can receive location-related information. To call this method, you must have both NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription keys in your app’s Info.plist file. After the user makes a selection and determines the status, the navigation service delivers the results to either the listener's NMNavigationServiceListener::onLocationServicesAuthorizationStatusChanged method or the listener's NMNavigationServiceListener::onLocationServicesDidChangeAuthorization depending on the current version of the operating system.
- (void) requestWhenInUseAuthorization |
When authorization status is not determined, calling this method will trigger a prompt to request "While Using the App" authorization from the user. You must call this method or requestAlwaysAuthorization before Navmii SDK can receive location-related information. The user prompt contains the text from the NSLocationWhenInUseUsageDescription key in your app's Info.plist file, and the presence of that key is required when calling this method. After the user makes a selection and determines the status, the navigation service delivers the results to either the listener's NMNavigationServiceListener::onLocationServicesAuthorizationStatusChanged method or the listener's NMNavigationServiceListener::onLocationServicesDidChangeAuthorization depending on the current version of the operating system.
- (void) setCoordinates: | (NMMapCoordinates *) | coordinates | |
course: | (NSNumber *) | course | |
Uses the specified parameters to update the position of the GPS marker on map.
coordinates | Coordinates to be used. |
course | Course to be used. |
- (void) setCoordinates: | (NMMapCoordinates *) | coordinates | |
course: | (float) | course | |
speed: | (float) | speed | |
horizontalAccuracy: | (float) | horizontalAccuracy | |
timeStamp: | (NSTimeInterval) | timeStamp | |
altitude: | (double) | altitude | |
Uses the specified parameters to update the position of the GPS marker on map.
coordinates | Coordinates to be used. |
course | Course to be used. |
speed | Speed to be used. |
horizontalAccuracy | HorizontalAccuracy to be used. |
timeStamp | Timestamp to be used. |
altitude | Altitude to be used. |
- (NMSnappingResult *) snapCoordinates: | (NMMapCoordinates *) | coordinates | |
heading: | (float) | heading | |
radiusInMeters: | (float) | radiusInMeters | |
snappingType: | (NMSnappingType) | snappingType | |
Tries to find the road nearest to the specified coordinates within the specified radius considering the specified heading. This method performs snapping in the main thread and returns result synchroniously.
coordinates | Coordinates to be snapped. |
heading | Target heading. |
radiusInMeters | Maximum distance to the nearest point of the road. |
snappingType | The type of the snapping. |
- (void) snapCoordinates: | (NMMapCoordinates *) | coordinates | |
heading: | (float) | heading | |
radiusInMeters: | (float) | radiusInMeters | |
snappingType: | (NMSnappingType) | snappingType | |
completion: | (NMSnappingCompletion) | completion | |
Tries to find the road nearest to the specified coordinates within the specified radius considering the specified heading. This method returns result asynchroniously.
coordinates | Coordinates to be snapped. |
heading | Target heading. |
radiusInMeters | Maximum distance to the nearest point of the road. |
snappingType | The type of the snapping. |
completion | Completion block throught which you'll be informed on snapping result. |
- (void) startDemoRoute: | (nonnull NMRoute *) | route |
Starts demo route.
- (void) startUpdatingHeading |
Starts updating heading.
- (void) startUpdatingLocation |
Starts receiving position updates.
- (void) stopDemoRoute |
Stops demo route.
- (void) stopUpdatingHeading |
Stops updating heading.
- (void) stopUpdatingLocation |
Stops receiving position updates.
|
readwritenonatomicassign |
User's location updates when in background mode. YES when allowed, NO when disallowed.
|
readnonatomicassign |
Current course of the GPS position arrow.
|
readnonatomiccopy |
Current coordinates along with altitude, course and snapping information.
|
readwritenonatomicassign |
Enables/disables the extrapolation of the GPS location, which results in smooth movement of GPS location marker. If disabled, GPS location marker will change it's position instantly when GPS location updates.
|
readnonatomicassign |
GPS signal status.
|
readnonatomicassign |
Specifies whether demo route is active.
|
readwritenonatomicassign |
GPS location accuracy.
|
readnonatomicassign |
The current location services authorization status for the app.
|
readwritenonatomicassign |
If set to YES, Navmii SDK will try to find the most suitable road for each GPS location and display the GPS location marker on it. If set to NO, GPS location marker will show real GPS location depending on whether the GPS extrapolation is enabled. Default value is YES;
|
readnonatomicstrong |
Instance of a track recorder. Returns nil if SDK is not initialized.