HERE iOS SDK Developer's Guide

NMATrafficWarner

Class Summary

class NMATrafficWarner

Derived from: NSObject

Provides traffic warning information for the current navigation session.

Include: NMAKit.framework/headers/NMATrafficWarner.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMATrafficWarner

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, weak] id< NMATrafficWarnerDelegate delegate

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(void) clear

Clears the traffic warner

-(BOOL) isTrafficNotification:( NMATrafficNotification *) trafficNotification onRoute:( NMARoute *) route

-(BOOL) isTrafficNotificationAhead:( NMATrafficNotification *) trafficNotification

Determines whether or not an NMATrafficNotification is ahead of the current GPS position (as reported by NMAPositioningManager)

-(void) start

Start the traffic warner delegate callbacks

-(void) stop

Stop the traffic warner delegate callbacks

-( NMATrafficNotification *) trafficNotificationOnCurrentRoute

Traffic notification for the route currently being navigated by NMANavigationManager

-( NMATrafficNotification *) trafficNotificationOnRoute:( NMARoute *) route

Traffic notification for all traffic on a given NMARoute

Class Details

Provides traffic warning information for the current navigation session.

IMPORTANT: In order to obtain traffic warning information and receieve NMATrafficWarnerDelegate callbacks traffic data must be downloaded using [ NMATrafficManager requestTrafficOnRoute:] or by enabling traffic visualization on an NMAMapView using the trafficVisible property. In the latter case you will only be warned of traffic that is, or was recently, visible on the map.

Note:

This class should not be initialized directly. An instance should be obtained via [ NMANavigationManager trafficWarner].

Public Property Details

[readable, writable, weak] id< NMATrafficWarnerDelegatedelegate

Delegate for notification of traffic events relevant to the current navigation session

Instance Method Details

-(void) clear

Clears the traffic warner.

This will permanently disable traffic warner until the a new navigation session is started using [ NMANavigationManager startTurnByTurnNavigationWithRoute:]

-(BOOL) isTrafficNotification:( NMATrafficNotification *) trafficNotification onRoute:( NMARoute *) route

Determines whether or not an NMATrafficNotification is on a given NMARoute

Parameters:

Returns:

YES if the notification is on the given route, NO otherwise.

-(BOOL) isTrafficNotificationAhead:( NMATrafficNotification *) trafficNotification

Determines whether or not an NMATrafficNotification is ahead of the current GPS position (as reported by NMAPositioningManager).

Returns:

YES if trafficNotification is ahead of the current GPS position.

-(void) start

Start the traffic warner delegate callbacks.

Will be started by default if there is an active navigation session ([ NMANavigationManager navigationState] is NMANavigationStateRunning)

-(void) stop

Stop the traffic warner delegate callbacks.

-( NMATrafficNotification *) trafficNotificationOnCurrentRoute

Traffic notification for the route currently being navigated by NMANavigationManager.

This returns traffic that is ahead of the current GPS position.

Note:

To ensure the traffic notification contains all traffic for the route you must explicitly download traffic data using NMATrafficManager for the NMARoute in question.

Returns:

NMATrafficNotification for the current navigation session or nil if NMANavigationManager is not navigating a route (mode NMANavigationModeTurnByTurn) using a transport mode of NMATransportModeCar.

-( NMATrafficNotification *) trafficNotificationOnRoute:( NMARoute *) route

Traffic notification for all traffic on a given NMARoute.

If the route is currently being navigated this method will return traffic for the entire route regardless of the current position along the route.

Note:

To ensure the traffic notification contains all traffic for the route you must explicitly download traffic data using NMATrafficManager for the NMARoute in question.

Parameters:

  • route

    NMARoute to query for a traffic notification.

Returns:

NMATrafficNotification for the route or nil if [[ NMARoute routingMode] transportMode] is not NMATransportModeCar.

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.