HERE iOS SDK Developer's Guide

<NMANavigationManagerDelegate>

Protocol Summary

protocol <NMANavigationManagerDelegate>

Derived from: <NSObject>

An interface for responding to navigation events sent by the NMANavigationManager.

Include: NMAKit.framework/headers/NMANavigationManager.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for <NMANavigationManagerDelegate> – <NMANavigationManagerDelegate>

[For complete information, see the section Protocol Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didChangeRoutingState:( NMATrafficEnabledRoutingState ) state

Called when the traffic avoidance routing state changes

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didFindAlternateRoute:( NMARoute *) route

Called when the navigation manager has found an improved route

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didPlayVoiceFeedbackWithText:(NSString *) text

Called when navigation manager has finished playing audio feedback

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateLaneInfo:(NSArray *) laneInfoList visible:(BOOL) visible

Deprecated: This method is deprecated as of NMA SDK 3.2. Please use navigationManager:didUpdateLaneInformation:roadElement: instead.

Called when lane information should be shown or hidden

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateLaneInformation:(NSArray *) laneInformationList roadElement:( NMARoadElement *) roadElement

Used to retrieve information about the lane configuration while navigating.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateRealisticViewsForCurrentManeuver:(NSDictionary *) realisticViews

Called when realistic views for the current (upcoming) maneuver are available

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateRealisticViewsForNextManeuver:(NSDictionary *) realisticViews

Called when realistic views for the next maneuver AFTER THE CURRENT MANEUVER are available

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateRoute:( NMARoute *) route

Called when a change is made to the route being navigated

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateSpeedingStatus:(BOOL) speeding forCurrentSpeed:(float) speed speedLimit:(float) speedLimit

Called when a speed limit warning is issued

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager hasCurrentManeuver:( NMAManeuver *) maneuver nextManeuver:( NMAManeuver *) nextManeuver

Called when the current (upcoming) maneuver is updated

- @optional (BOOL) navigationManager:( NMANavigationManager *) navigationManager shouldPlayVoiceFeedbackWithText:(NSString *) text

Called when the navigation manager has audio feedback to play

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager willPlayVoiceFeedbackWithText:(NSString *) text

Called when navigation manager will play audio feedback

- @optional (void) navigationManagerDidFindPosition:( NMANavigationManager *) navigationManager

Called when the navigation manager finds its position

- @optional (void) navigationManagerDidInvalidateRealisticViews:( NMANavigationManager *) navigationManager

Called when all realistic views supplied before this callback are invalidated

- @optional (void) navigationManagerDidLosePosition:( NMANavigationManager *) navigationManager

Called when the navigation manager loses its position

- @optional (void) navigationManagerDidReachDestination:( NMANavigationManager *) navigationManager

Called when the destination of turn-by-turn navigation is reached

- @optional (void) navigationManagerDidReroute:( NMANavigationManager *) navigationManager

Called when rerouting has finished

- @optional (void) navigationManagerWillReroute:( NMANavigationManager *) navigationManager

Called when rerouting is triggered

Protocol Details

An interface for responding to navigation events sent by the NMANavigationManager.

 

Instance Method Details

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didChangeRoutingState:( NMATrafficEnabledRoutingState ) state

Called when the traffic avoidance routing state changes.

Note:

This callback is only sent when traffic avoidance is enabled or was just disabled.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • state

    An enum NMATrafficEnabledRoutingState representing the current traffic enabled routing state.

See also:

NMANavigationManager::setTrafficAvoidanceMode:

NMATrafficEnabledRoutingState

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didFindAlternateRoute:( NMARoute *) route

Called when the navigation manager has found an improved route.

When the navigation manager traffic avoidance mode is manual, the navigation manager will search for faster routes, but will not automatically switch to them.

When a new route is found, it is up to the navigation manager delegate to determine whether or not to use it. To use the new route, call setRoute: with the new route.

The new route may be set after returning from this callback, but it is not recommended to wait more than a few seconds before switching the route since a delay might cause the user to receive an invalid instruction from the old route or miss the first instruction from the new route.

Note:

This callback is only sent when NMATrafficAvoidanceManual is in use.

Parameters:

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didPlayVoiceFeedbackWithText:(NSString *) text

Called when navigation manager has finished playing audio feedback.

Parameters:

  • text

    The text that was spoken. This will be nil for non-voice audio feedback or if the NMAVoicePackage in use does not support generating text strings from voice commands.

  • navigationManager

    The NMANavigationManager singleton.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateLaneInfo:(NSArray *) laneInfoList visible:(BOOL) visible

Deprecated: This method is deprecated as of NMA SDK 3.2. Please use navigationManager:didUpdateLaneInformation:roadElement: instead.

Called when lane information should be shown or hidden.

No callback if access to this operation is denied. Contact your HERE representative for more information.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • laneInfoList

    An array of NMALaneInfo objects containing lane info related to current position.

  • visible

    A boolean value indicating whether the supplied lane info should be shown or hidden.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateLaneInformation:(NSArray *) laneInformationList roadElement:( NMARoadElement *) roadElement

Used to retrieve information about the lane configuration while navigating.

Called when new information about lanes is available. This method is called whenever the current available lane information changes. No available lane information is indicated by a count of zero for the laneInformationList (e.g. lane information should stop being displayed).

The lanes are ordered from left (index = 0) to right (index = laneInformationList.count - 1).

No callback if access to this operation is denied. Contact your HERE representative for more information.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • laneInformationList

    An array ofNMALaneInformation objects. An empty array indicates that no lane information is available and lane information should stop being shown. The lanes are ordered from left (index = 0) to right (index= laneInformationList.count - 1).

  • roadElement

    The NMARoadElement that the NMALaneInformation is associated with. nil if not available or if laneInformationList is empty.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateRealisticViewsForCurrentManeuver:(NSDictionary *) realisticViews

Called when realistic views for the current (upcoming) maneuver are available.

Here is an example of how to get signpost/junction view with aspect ratio 16x9:

NSDictionary* realisticView = [realisticViews objectForKey:NMARealisticView16x9Key];
NMAImage* signpost = [realisticView objectForKey:NMANavigationManagerSignpostKey];
NMAImage* junctionView = [realisticView objectForKey:NMANavigationManagerJunctionViewKey];

This callback will not be made if access to this operation is denied. Contact your HERE representative for more information.

Note:

The "current" maneuver is the upcoming, or next, maneuver to be taken. The "next" maneuver is actually the maneuver to be taken after the current maneuver.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • realisticViews

    A dictionary of realistic view objects containing a junction view and/or a 2D signpost for the current (upcoming) maneuver using aspect ratio as the key.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateRealisticViewsForNextManeuver:(NSDictionary *) realisticViews

Called when realistic views for the next maneuver AFTER THE CURRENT MANEUVER are available.

Here is an example of how to get signpost/junction view with aspect ratio 16x9:

NSDictionary* realisticView = [realisticViews objectForKey:NMARealisticView16x9Key];
NMAImage* signpost = [realisticView objectForKey:NMANavigationManagerSignpostKey];
NMAImage* junctionView = [realisticView objectForKey:NMANavigationManagerJunctionViewKey];

This may be used as an advance notification. Assuming there are maneuvers A and B and there is a realistic view for maneuver B. When A is the current (upcoming) maneuver, a realistic view for maneuver B will be provided in this navigationManager:didUpdateRealisticViewsForNextManeuver callback. When maneuver B becomes the current (upcoming) maneuver, the realistic view for maneuver B will be provided again in the navigationManager:didUpdateRealisticViewsForCurrentManeuver callback.

This callback will not be made if access to this operation is denied. Contact your HERE representative for more information.

Note:

The "current" maneuver is the upcoming, or next, maneuver to be taken. The "next" maneuver is actually the maneuver to be taken after the current maneuver.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • realisticViews

    A dictionary of realistic view objects containing a junction view and/or a 2D signpost for the next maneuver AFTER THE CURRENT MANEUVER using aspect ratio as the key.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateRoute:( NMARoute *) route

Called when a change is made to the route being navigated.

Parameters:

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager didUpdateSpeedingStatus:(BOOL) speeding forCurrentSpeed:(float) speed speedLimit:(float) speedLimit

Called when a speed limit warning is issued.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • speeding

    A boolean value indicating the current speeding status; YES if the user is speeding.

  • speed

    The current speed of the user in meters/second.

  • speedLimit

    The speed limit in meters/second or 0 if the information is not available.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager hasCurrentManeuver:( NMAManeuver *) maneuver nextManeuver:( NMAManeuver *) nextManeuver

Called when the current (upcoming) maneuver is updated.

Note:

The "current" maneuver is the upcoming, or next, maneuver to be taken. The "next" maneuver is actually the maneuver to be taken after the current maneuver.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • maneuver

    The current (upcoming) maneuver to be made.

  • nextManeuver

    The maneuver to be made AFTER THE CURRENT MANEUVER.

- @optional (BOOL) navigationManager:( NMANavigationManager *) navigationManager shouldPlayVoiceFeedbackWithText:(NSString *) text

Called when the navigation manager has audio feedback to play.

If the delegate returns NO, the pending feedback will not be played. If the delegate returns YES or this method is not implemented, the feedback will be played. This method will be called once for each voice instruction or other non-voice audio feedback (e.g. speed warning beeps).

This method can be used to play voice commands using a custom TTS (text to speech) engine. To accomplish this you should write a new NMAAudioOutput class that plays text using the custom engine. When this method is called create an instance of your custom NMAAudioOutput, pass it to [ NMAAudioManager playOutput:] and then return NO. This will ensure your custom TTS output is correctly synced with non-voice audio feedback.

Parameters:

  • navigationManager

    The NMANavigationManager singleton.

  • text

    The text to be spoken. This will be nil for non-voice audio feedback or if the NMAVoicePackage in use does not support generating text strings from voice commands.

Returns:

YES to have the voice feedback played by NMANavigationManager. NO to prevent NMANavigationManager playing the voice feedback.

- @optional (void) navigationManager:( NMANavigationManager *) navigationManager willPlayVoiceFeedbackWithText:(NSString *) text

Called when navigation manager will play audio feedback.

Parameters:

  • text

    The text to be spoken. This will be nil for non-voice audio feedback or if the NMAVoicePackage in use does not support generating text strings from voice commands.

  • navigationManager

    The NMANavigationManager singleton.

- @optional (void) navigationManagerDidFindPosition:( NMANavigationManager *) navigationManager

Called when the navigation manager finds its position.

Parameters:

- @optional (void) navigationManagerDidInvalidateRealisticViews:( NMANavigationManager *) navigationManager

Called when all realistic views supplied before this callback are invalidated.

If 2 maneuvers are close to each other and both has realistic views, it is not guaranteed that a navigationManagerDidInvalidateRealisticViews callback will be issued between maneuvers. When this callback is received, it is important that application discards all realistic views received.

No callback if access to this operation is denied. Contact your HERE representative for more information.

Note:

In general, a realistic view for the next maneuver is received before a realistic view for the current (upcoming) maneuver. Take maneuvers A, B, and C. When A is the current (upcoming) maneuver, a realistic view for the next maneuver B is supplied. As the user moves ahead, B becomes the current (upcoming) maneuver. As the user is close to maneuver B, a realistic view for the current (upcoming) maneuver B is supplied again. As the user moves onto maneuver C, navigationManagerDidInvalidateRealisticViews is received so that application can remove all realistic views supplied this far.

Note:

The "current" maneuver is the upcoming, or next, maneuver to be taken. The "next" maneuver is actually the maneuver to be taken after the current maneuver.

Parameters:

- @optional (void) navigationManagerDidLosePosition:( NMANavigationManager *) navigationManager

Called when the navigation manager loses its position.

When the raw position (e.g. GPS) is lost, navigation may continue for a time if the current position can be successfully estimated. This may occur for example when traveling through a tunnel. This callback will not be sent until the position can no longer be estimated. Thus, it may occur some time after the didLosePosition notification from NMAPositioningManager.

Parameters:

- @optional (void) navigationManagerDidReachDestination:( NMANavigationManager *) navigationManager

Called when the destination of turn-by-turn navigation is reached.

When the destination is reached, NMANavigationManager -stop is automatically called. When this callback is received, the navigation manager state will be NMANavigationStateIdle.

- @optional (void) navigationManagerDidReroute:( NMANavigationManager *) navigationManager

Called when rerouting has finished.

Parameters:

- @optional (void) navigationManagerWillReroute:( NMANavigationManager *) navigationManager

Called when rerouting is triggered.

Parameters:

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.