HERE iOS SDK Developer's Guide

Traffic Information

The HERE iOS SDK offers real-time traffic flow and congestion overlays. Traffic information can be displayed on the NMAMapView (where available) by setting its trafficInfoVisible property to YES. While the HERE SDK requires a network data connection to download real time traffic information, the visualization may continue to be displayed even if a connection is lost—until the traffic events expire, or the visibility is toggled.

Note: If you set the trafficInfoVisible property to YES in NMAMapView, you need to switch the map view to one of the following schemes.
  • NMAMapSchemeNormalDayWithTraffic
  • NMAMapSchemeNormalNightWithTraffic
  • NMAMapSchemeHybridDayWithTraffic
  • NMAMapSchemeHybridNightWithTraffic
  • NMAMapSchemeCarNavigationDayWithTraffic
  • NMAMapSchemeCarNavigationNightWithTraffic
  • NMAMapSchemeHybridCarNavigationDayWithTraffic
For more information on map schemes, see Map Schemes

Traffic visualization is refreshed when one of the following happens:

  1. The map is moved by a significant distance
  2. The map is not moved for 5 minutes

Traffic Flow

Traffic flow lines are color-coded as follows:

  • Green - Normal
  • Amber - High
  • Red - Very High
  • Black - Blocking

The following figure provides an example of traffic visualization:

Figure 1. Traffic information with color-coded lines

You can control the display of traffic flow lines by using the trafficDisplayFilter property on NMAMapView.

For example, you can set the map to only display traffic flow lines that are "very high" (red) or "blocking" (black) by performing the following:

//set the minimum displayed traffic level
mapView.trafficDisplayFilter = NMATrafficSeverityVeryHigh;

Traffic Incidents

The traffic information updates contain live traffic event information; these events are represented by various icons on the map. The following figures show examples of different types of traffic events:

Figure 2. NMATrafficObject example: Roadwork
Figure 3. NMATrafficObject example: Accident
Figure 4. NMATrafficObject example: Road Closed

Traffic Objects and Events

Traffic events are represented on the map using instances of the NMATrafficObject proxy object class. These objects may be selected either by tapping on the map (which returns the objects from the -mapView:didSelectObjects: method in the NMAMapViewDelegate protocol) or by calling the -objectsAtPoint: method in NMAMapView. The underlying event is represented by an instance of NMATrafficEvent, which may be accessed via the trafficEvent property in NMATrafficObject. The properties in NMATrafficEvent contain information about the event, including type, description, and affected streets.