Navmii SDK  2.2.0
Write yourself a navigation system in iOS
Instance Methods | Class Methods | Properties | List of all members
NMRouteNavigator Class Reference

Inherits <NSObject>.

Instance Methods

(void) - startNavigatingTheRoute:isCalculatedFromCurrentPosition:
 
(void) - stopNavigation
 
(void) - pauseNavigation
 
(void) - resumeNavigation
 
(void) - addRouteNavigationListener:
 
(void) - removeRouteNavigationListener:
 
(void) - addRouteVisualizerRequestListener:
 
(void) - removeRouteVisualizerRequestListener:
 
(void) - addGuidanceListener:
 
(void) - removeGuidanceListener:
 
(void) - addReroutingListener:
 
(void) - removeReroutingListener:
 
(void) - addReroutingByTrafficListener:
 
(void) - removeReroutingByTrafficListener:
 
(nullable instancetype) - NS_UNAVAILABLE
 

Class Methods

(nullable instancetype) + NS_UNAVAILABLE
 

Properties

BOOL isNavigationActive
 
NMRouteroute
 
BOOL isNavigationPaused
 
NMOnRouteState onRouteState
 
BOOL hasReachedDestination
 
NMRoutePlanremainingWaypoints
 
NMDirectionnextDirection
 
NSInteger distanceToNextDirectionInMeters
 
NMPositionOnRoutepositionOnRoute
 
NMRouteVisualizationSettingsrouteVisualizationSettings
 
NMRouteVisualizerRequestrouteVisualizerRequest
 
NMGuidanceSettingsguidanceSettings
 
NSInteger maxServerRoutesSnappingDistanceInMeters
 
NMReroutingSettingsreroutingSettings
 
BOOL reroutingEnabled
 
BOOL reroutingByTrafficEnabled
 

Detailed Description

Interface allowing to access altering information about the route being navigated.

Method Documentation

◆ addGuidanceListener:()

- (void) addGuidanceListener: (addGuidanceListener(listener:))  NS_SWIFT_NAME

Adds guidance listener.

Parameters
listener@nonnull Listener to add.

◆ addReroutingByTrafficListener:()

- (void) addReroutingByTrafficListener: (addReroutingByTrafficListener(listener:))  NS_SWIFT_NAME

Adds rerouting by traffic events listener.

Parameters
listener@nonnull Listener to add.

◆ addReroutingListener:()

- (void) addReroutingListener: (addReroutingListener(listener:))  NS_SWIFT_NAME

Adds rerouting events listener.

Parameters
listener@nonnull Listener to add.

◆ addRouteNavigationListener:()

- (void) addRouteNavigationListener: (addRouteNavigationListener(listener:))  NS_SWIFT_NAME

Adds route navigation listener.

Parameters
listener@nonnull Listener to add.

◆ addRouteVisualizerRequestListener:()

- (void) addRouteVisualizerRequestListener: (addRouteVisualizerRequestListener(listener:))  NS_SWIFT_NAME

Adds route visualizer request listener.

Note
You can pass an NMRouteVisualizer object as a parameter to directly connect a route navigator to a route visualizer.
Parameters
listener@nonnull Listener to add.

◆ NS_UNAVAILABLE() [1/2]

+ (nullable instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE() [2/2]

- (nullable instancetype) NS_UNAVAILABLE

Default initialization is forbidden.

◆ pauseNavigation()

- (void) pauseNavigation

Tells the navigator to pause the route navigation. The route navigation stays paused until resumeNavigation method is called. While route navigation is paused, position on current route (if one is available) is NOT updated and you don't get any listeners called as well.

◆ removeGuidanceListener:()

- (void) removeGuidanceListener: (removeGuidanceListener(listener:))  NS_SWIFT_NAME

Removes guidance listener.

Parameters
listener@nonnull Listener to remove.

◆ removeReroutingByTrafficListener:()

- (void) removeReroutingByTrafficListener: (removeReroutingByTrafficListener(listener:))  NS_SWIFT_NAME

Removes rerouting by traffic events listener.

Parameters
listener@nonnull Listener to remove.

◆ removeReroutingListener:()

- (void) removeReroutingListener: (removeReroutingListener(listener:))  NS_SWIFT_NAME

Removes rerouting events listener.

Parameters
listener@nonnull Listener to remove.

◆ removeRouteNavigationListener:()

- (void) removeRouteNavigationListener: (removeRouteNavigationListener(listener:))  NS_SWIFT_NAME

Removes route navigation listener.

Parameters
listener@nonnull Listener to remove.

◆ removeRouteVisualizerRequestListener:()

- (void) removeRouteVisualizerRequestListener: (removeRouteVisualizerRequestListener(listener:))  NS_SWIFT_NAME

Removes route visualizer request listener.

Parameters
listener@nonnull Listener to remove.

◆ resumeNavigation()

- (void) resumeNavigation

Tells the navigator to resume the route navigation.

◆ startNavigatingTheRoute:isCalculatedFromCurrentPosition:()

- (void) startNavigatingTheRoute: (nonnull NMRoute *)  route
isCalculatedFromCurrentPosition: (BOOL)  isCalculatedFromCurrentPosition 

Loads a route into the navigator.

Parameters
route@nonnull A route for navigation.
isCalculatedFromCurrentPositionSpecifies whether the first point of the passed route should be treated as current position. Passing YES specifies that if, after passing the route to the navigator, the real current device position notably differs from the first point of the route, the first point of the route will be removed and the route will be recalculated from the real current device position. All other route plan points will remain unchanged. Passing NO on the other hand behaves differently depending on the method used to obtain the route. If the route was obtained using calculateRouteUsingRoutePlan:statusReportListener: , or calculateRouteUsingRoutePlan:options:statusReportListener: , or snapRoute:options:statusReportListener: methods of NMRoutingService, passing NO may cause calculation of additional route leg from the current device position to the first point of the passed route, if the first route point notably differs from the current device position. If the route was obtained using snapRoute:fromPosition:options:statusReportListener: method of NMRoutingService, passing NO will have no effect and the route will be treated as calculated from current position.

◆ stopNavigation()

- (void) stopNavigation

Stops navigating the route previously loaded into the navigator.

Property Documentation

◆ distanceToNextDirectionInMeters

- (NSInteger) distanceToNextDirectionInMeters
readnonatomicassign

Returns the distance to the next direction for the route loaded into the navigator. Returns -1 if the distance is unavailable (i.e. GPS position is missing etc.) or no route is loaded into the navigator.

◆ guidanceSettings

- (NMGuidanceSettings*) guidanceSettings
readnonatomicstrong

Returns guidance module settings. You can change settings using the returned object.

◆ hasReachedDestination

- (BOOL) hasReachedDestination
readnonatomicassign

Indicates whether the route destination was reached. Returns 'NO' if no route is loaded into the navigator.

◆ isNavigationActive

- (BOOL) isNavigationActive
readnonatomicassign

Indicates whether a route is loaded into the navigator.

◆ isNavigationPaused

- (BOOL) isNavigationPaused
readnonatomicassign

Indicates whether the route navigation is paused.

◆ maxServerRoutesSnappingDistanceInMeters

- (NSInteger) maxServerRoutesSnappingDistanceInMeters
readwritenonatomicassign

Defines the maximal distance of server routes snapping if automatic rerouting or rerouting by traffic occurs. For more information see maxServerRoutesSnappingDistanceInMeters property in NMRouteCalculationOptions class. If zero value is specified, the default value of maxServerRoutesSnappingDistanceInMeters property is used.

Default value is 0.

◆ nextDirection

- (NMDirection*) nextDirection
readnonatomiccopy

Returns the next direction info for the route loaded into the navigator. Returns 'nil' if no next direction info is available (i.e. GPS position is missing etc.) or no route is loaded into the navigator.

◆ onRouteState

- (NMOnRouteState) onRouteState
readnonatomicassign

Returns #OnRouteState for the route being navigated if available. Returns NMOnRouteState_Undefined if no route is loaded into the navigator.

◆ positionOnRoute

- (NMPositionOnRoute*) positionOnRoute
readnonatomiccopy

Returns the current position on the route loaded into the navigator. Returns 'nil' if no current position is available (i.e. GPS position is missing etc.) or no route is loaded into the navigator.

◆ remainingWaypoints

- (NMRoutePlan*) remainingWaypoints
readnonatomiccopy

Returns the remaining waypoint list if route is loaded into the navigator or 'nil' otherwise.

◆ reroutingByTrafficEnabled

- (BOOL) reroutingByTrafficEnabled
readwritenonatomicassign

Specifies whether automatic rerouting by traffic is enabled.

Default value is 'YES'.

◆ reroutingEnabled

- (BOOL) reroutingEnabled
readwritenonatomicassign

Specifies whether automatic rerouting handling is enabled.

Default value is 'YES'.

◆ reroutingSettings

- (NMReroutingSettings*) reroutingSettings
readwritenonatomicstrong

Specifies settings to be used during automatic rerouting handling.

◆ route

- (NMRoute*) route
readnonatomicstrong

Returns the route loaded into the navigator if available or 'nil' otherwise.

◆ routeVisualizationSettings

- (NMRouteVisualizationSettings*) routeVisualizationSettings
readwritenonatomicstrong

Specifies route visualization settings to be used to generate route visualizer requests.

◆ routeVisualizerRequest

- (NMRouteVisualizerRequest*) routeVisualizerRequest
readnonatomiccopy

A route visualizer request which needs to be performed to display the current route navigator state on map.