HERE iOS SDK Developer's Guide

NMAVenue3dNavigationManager

Class Summary

class NMAVenue3dNavigationManager

Derived from: NSObject

NMAVenue3dNavigationManager is a navigation manager class that provides guidance advice and information along an indoor route.

Include: NMAKit.framework/headers/NMAVenue3dNavigationManager.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAVenue3dNavigationManager

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, assign] float  averageSpeed

Returns the average speed of distance travelled in meters/sec or 0 if it cannot be calculated

[readable, writable, assign] BOOL  backgroundNavigationEnabled

Controls whether indoor navigation is paused when the application is sent to the background

[readable, writable, assign] BOOL  backgroundNavigationStartEnabled

Controls whether indoor navigation may be started when the app is in the background

[readable, writable, assign] bool  beepsEnabled

Enables/disables device beep sounds during navigation

[readable, assign] NMAVenue3dRouteManeuver currentManeuver

Returns current (upcoming) maneuver on the route, or nil, if this information is not available because the navigation hasn't been started, or there are no maneuvers on the route

[readable, assign] float  distanceFromStart

Returns the distance from route start to the current position in meters, or NMAVenue3dNavigationManagerInvalidValue on error

[readable, assign] float  distanceToCurrentManeuver

Returns the distance from current position to the current (upcoming) maneuver in meters, or NMAVenue3dNavigationManagerInvalidValue on error

[readable, assign] float  distanceToDestination

Returns the distance from current position to the end of route in meters, or NMAVenue3dNavigationManagerInvalidValue on error

[readable, assign] float  distanceToNextManeuver

Returns the distance from current position to the next maneuver AFTER THE CURRENT MANEUVER in meters, or NMAVenue3dNavigationManagerInvalidValue on error

[readable, writable, assign] float  maneuverZoomDistance

Distance in meters at which a maneuver is zoomed in if maneuver zoom is enabled

[readable, writable, assign] BOOL  maneuverZoomEnabled

Flag indicating wether maneuver zoom is enabled

[readable, writable, assign] float  maneuverZoomLevel

Zoom level to which a maneuver is zoomed in if maneuver zoom is enabled

[readable, writable, assign] BOOL  mapTrackingEnabled

Allows the NMANavigationManager to automatically update map position as navigation progresses

[readable, writable, assign] NMAVenue3dTrackingMode   mapTrackingMode

Controls how the map is moved and rotated when map tracking is enabled

[readable, writable, assign] NMAVenue3dTrackingTilt   mapTrackingTilt

Controls how the map is tilted when map tracking is enabled

[readable, assign] NMAVenue3dNavigationState   navigationState

Returns the current state of the navigation related to the tracked route

[readable, assign] NMAVenue3dRouteManeuver nextManeuver

Returns the next maneuver on the route AFTER THE CURRENT MANEUVER , or nil if there is none

[readable, writable, assign] BOOL  paused

When set to YES, the current navigation will be paused (if any)

[readable, writable, assign] NSTimeInterval  reroutingTimeout

Returns the time interval in seconds, after which the route will be recalculated in case the user moves far away from the current route

[readable, assign] NSTimeInterval  timeToArrival

Returns the number of seconds that remain to travel to the destination, or NMAVenue3dNavigationManagerInvalidTimeInterval on error

[readable, weak] NMAVenue3dMapLayer venueMapLayer

The NMAVenue3dMapLayer object for navigation manager

[readable, writable, assign] bool  vibrationEnabled

Enables/disables device vibration during navigation

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(void) addListener:(nonnull id< NMAVenue3dNavigationListener >) listener

Adds a listener to the navigation manager

-(nonnull instancetype) init

-(void) removeListener:(nonnull id< NMAVenue3dNavigationListener >) listener

Removes a listener from the navigation manager

-(BOOL) startForLinkSection:(nonnull NMAVenue3dLinkRouteSection *) linkSection inCombinedRoute:(nonnull NMAVenue3dCombinedRoute *) combinedRoute

Starts a tracking session using the specified link route section in combined route

-(BOOL) startForRouteSection:(nonnull NMAVenue3dVenueRouteSection *) routeSection inCombinedRoute:(nonnull NMAVenue3dCombinedRoute *) combinedRoute

Starts a turn-by-turn navigation session using the specified venue route section in combined route

-(void) stop

Stops the current navigation started via start

Class Method Summary

Table 3. Class Methods
Class Methods

+(nonnull instancetype) new

Class Details

NMAVenue3dNavigationManager is a navigation manager class that provides guidance advice and information along an indoor route.

Public Property Details

[readable, assign] float averageSpeed

Returns the average speed of distance travelled in meters/sec or 0 if it cannot be calculated.

[readable, writable, assign] BOOL backgroundNavigationEnabled

Controls whether indoor navigation is paused when the application is sent to the background. Default value is NO (Background indoor navigation is disabled).

This property must be set whilst the app is in the foreground and has at least a CLAuthorizationStatus of kCLAuthorizationStatusAuthorizedWhenInUse. Changing the property whilst the app is in the background will have undefined behaviour and may not reliably enable the background position updates required by navigation.

Note:

The current NMAPositioningManager::dataSource must support background position updates in order to navigate in the background. All position data sources supplied with the Here SDK support background position updates. If the current position data source does not support background position updates then background navigation will not work even though this property may be set to YES.

Note:

If navigation is stopped in the background, it will not restart automatically.

Note:

This property can conflict with NMANavigationManager::backgroundNavigationEnabled, because they both rely on NNMAPositioningManager.dataSource.backgroundUpdatesEnabled property.

See also:

setBackgroundUpdatesEnabled:

NMANavigationManager::backgroundNavigationEnabled

[readable, writable, assign] BOOL backgroundNavigationStartEnabled

Controls whether indoor navigation may be started when the app is in the background. Default value is NO (Navigation can not be started in the background and calls to startForRouteSection: will return an error (NO/false return type)).

This property must be set whilst the app is in the foreground and has at least a CLAuthorizationStatus of kCLAuthorizationStatusAuthorizedWhenInUse. Changing the property whilst the app is in the background will have undefined behaviour and may not reliably enable the background position updates required by navigation.

IMPORTANT: Even with this property set to YES if your app enters the background and then enters the suspended state you may not be able to reliably start navigation in the background if the app resumes background execution without returning to the foreground first (e.g. background execution resumes to "silently" handle a push notification or a file download completing). To guarantee navigation can be started after background suspension you must also call [ NMAPositioningManager startPositioning] in the foreground. This will mean your app will be constantly waking to handle position updates in the background which will have a side effect of consuming more power. Only the combination of explicitly starting NMAPositioningManager, setting backgroundNavigationEnabled to YES and setting backgroundNavigationStartEnabled to YES in the foreground will allow navigation to be reliably started in the background.

Note:

The current NMAPositioningManager::dataSource must support background position updates in order to navigate in the background. All position data sources supplied with the Here SDK support background position updates. If the current position data source does not support background position updates then background navigation will not work even though this property may be set to YES.

See also:

backgroundNavigationEnabled

NMANavigationManager::backgroundNavigationStartEnabled

[readable, writable, assign] bool beepsEnabled

Enables/disables device beep sounds during navigation. If enabled, it will happen on specific navigation events, like maneuver change, rerouting, reaching destination, etc.

Note:

beeps are enabled by default.

[readable, assign] NMAVenue3dRouteManeuvercurrentManeuver

Returns current (upcoming) maneuver on the route, or nil, if this information is not available because the navigation hasn't been started, or there are no maneuvers on the route.

Note:

The currentManeuver property represents the upcoming, or next, maneuver to be taken. The nextManeuver property is actually the maneuver to be taken after the current maneuver.

[readable, assign] float distanceFromStart

Returns the distance from route start to the current position in meters, or NMAVenue3dNavigationManagerInvalidValue on error.

[readable, assign] float distanceToCurrentManeuver

Returns the distance from current position to the current (upcoming) maneuver in meters, or NMAVenue3dNavigationManagerInvalidValue on error.

[readable, assign] float distanceToDestination

Returns the distance from current position to the end of route in meters, or NMAVenue3dNavigationManagerInvalidValue on error.

[readable, assign] float distanceToNextManeuver

Returns the distance from current position to the next maneuver AFTER THE CURRENT MANEUVER in meters, or NMAVenue3dNavigationManagerInvalidValue on error.

[readable, writable, assign] float maneuverZoomDistance

Distance in meters at which a maneuver is zoomed in if maneuver zoom is enabled.

[readable, writable, assign] BOOL maneuverZoomEnabled

Flag indicating wether maneuver zoom is enabled.

[readable, writable, assign] float maneuverZoomLevel

Zoom level to which a maneuver is zoomed in if maneuver zoom is enabled.

[readable, writable, assign] BOOL mapTrackingEnabled

Allows the NMANavigationManager to automatically update map position as navigation progresses.

Note:

The default value is YES.

[readable, writable, assign] NMAVenue3dTrackingMode  mapTrackingMode

Controls how the map is moved and rotated when map tracking is enabled.

Note:

The default value is NMAVenue3dTrackingModeFollow.

[readable, writable, assign] NMAVenue3dTrackingTilt  mapTrackingTilt

Controls how the map is tilted when map tracking is enabled.

In 2D and 3D modes, the map will automatically be tilted back appropriately when the tilt value is changed. In Custom mode, the tilt will not be changed. Use custom mode to allow the map to be manually tilted during navigation or to set the tilt to a fixed custom value.

Note:

The default value is NMAVenue3dTrackingTilt3D.

[readable, assign] NMAVenue3dNavigationState  navigationState

Returns the current state of the navigation related to the tracked route.

[readable, assign] NMAVenue3dRouteManeuvernextManeuver

Returns the next maneuver on the route AFTER THE CURRENT MANEUVER , or nil if there is none.

Note:

The nextManeuver property represents the maneuver, which comes after current maneuver. The current maneuver represents the upcoming, or next maneuver to be taken.

[readable, writable, assign] BOOL paused

When set to YES, the current navigation will be paused (if any). When set to NO, the current navigation will resume if previously paused. This has no effect if there is no navigation currently in progress.

[readable, writable, assign] NSTimeInterval reroutingTimeout

Returns the time interval in seconds, after which the route will be recalculated in case the user moves far away from the current route.

When the user significantly deviates from the specified route, he is given exactly reroutingTimeout secs return to the route. When the user fails to do so within this timeout, the rerouting process is started and a new route will be constructed based on the user's current position.

See also:

navigationManagerWillReroute:

[readable, assign] NSTimeInterval timeToArrival

Returns the number of seconds that remain to travel to the destination, or NMAVenue3dNavigationManagerInvalidTimeInterval on error.

[readable, weak] NMAVenue3dMapLayervenueMapLayer

The NMAVenue3dMapLayer object for navigation manager.

[readable, writable, assign] bool vibrationEnabled

Enables/disables device vibration during navigation. If enabled, it will happen on specific navigation events, like maneuver change, rerouting, reaching destination, etc.

Note:

vibration is enabled by default.

Instance Method Details

-(void) addListener:(nonnull id< NMAVenue3dNavigationListener >) listener

Adds a listener to the navigation manager. The listener must implement the NMAVenue3dNavigationListener protocol. The listener receives event callbacks containing information about the current navigation session.

Parameters:

See also:

NMAVenue3dNavigationListener

-(nonnull instancetype) init

Instances of this class should not be initialized directly

-(void) removeListener:(nonnull id< NMAVenue3dNavigationListener >) listener

Removes a listener from the navigation manager. The listener must implement the NMAVenue3dNavigationListener protocol. The listener receives event callbacks containing information about the current navigation session.

Parameters:

See also:

NMAVenue3dNavigationListener

Starts a tracking session using the specified link route section in combined route.

Parameters:

  • linkSection

    The link route section to track.

  • combinedRoute

    The combined route which contains the link route section.

Returns:

YES if started successfully and NO otherwise, indicating that the link route section is invalid, the combined route doesn't contain that route section or the navigation is already running.

-(BOOL) startForRouteSection:(nonnull NMAVenue3dVenueRouteSection *) routeSection inCombinedRoute:(nonnull NMAVenue3dCombinedRoute *) combinedRoute

Starts a turn-by-turn navigation session using the specified venue route section in combined route.

Parameters:

  • routeSection

    The venue route section to navigate.

  • combinedRoute

    The combined route which contains the venue route section.

Returns:

YES if started successfully and NO otherwise, indicating that the venue route section is invalid, the combined route doesn't contain that route section or the navigation is already running.

-(void) stop

Stops the current navigation started via start.

Class Method Details

+(nonnull instancetype) new

Instances of this class should not be initialized directly