With the HERE SDK, developers can enable turn-by-turn route navigation that takes live traffic information into account. The
setTrafficAvoidanceMode: method in
NMANavigationManager can be used to set the way in which traffic should be handled during navigation.
NMATrafficAvoidanceModeenumerations. The default mode is
NMATrafficAvoidanceDynamic- Performs traffic-aware rerouting without user input.
In this mode, the guidance engine performs periodic route calculations while the device is online. A route calculation is a server request where the server finds the most optimal route by avoiding traffic congestions and calculating speed limits. If the calculated route is different from the current route, the navigation manager automatically switches to the new route. It also triggers the
navigationManager:didUpdateRoute:delegate method.Note: You can set the frequency of the route request by using
NMATrafficAvoidanceManual- Provides the traffic-aware rerouting callback
In this mode, no rerouting occurs unless the
NMANavigationManageris explicitly set with the new
NMARoute. For more information, see the next section.
NMATrafficAvoidanceDisabled- Disables use of traffic for rerouting purpose.