# Get started with Traffic The HERE SDK provides real-time and predictive traffic information for routing and navigation use cases. * Use the `TrafficEngine` to query traffic incidents and traffic flow information. * Calculate routes with the online `RoutingEngine` that include predicted traffic information and jam factors as part of the `Route` object. This can be used to render traffic information directly on the route during route preview. * The `RoutingEngine` also allows querying updated `TrafficOnRoute` information. This can be useful for updating the ETA or refreshing the rendered traffic along the route. * During navigation, the `VisualNavigator` can optionally render `TrafficOnRoute` (available only with the Navigate license). * On the map view, traffic incidents and traffic flow information can be visualized in real time using the `TRAFFIC_FLOW` and `TRAFFIC_INCIDENTS` map features. Note that navigation features are only available for the HERE SDK (Navigate). ## Real-time versus predictive traffic data sources * **Real-time traffic** data represents the current traffic situation at the moment of the request. This data is based on information such as actual road conditions, vehicle speeds, and reported incidents. The map visualization using `MapFeature.TRAFFIC_FLOW` is mostly based on real-time traffic data. * **Predictive traffic data** anticipates future traffic conditions based on information such as historical patterns and current trends, including real-time data. The `RoutingEngine` and the included `TrafficOnRoute` data is mostly based on predicitve traffic data as this allows to calculate the expected ETA and forecast traffic conditions more precisely while travelling towards the destination. The main difference is timing: real-time data shows what's happening now, while predictive data estimates what will happen when you reach that part of your route. This can lead to discrepancies: * A route calculated now might show different jam factors than the real-time traffic flow map feature, because the route considers also predicted conditions for later roads when you'll actually be driving there. * The `TrafficEngine` queries can return different data than what's shown on the `TRAFFIC_FLOW` layer, as requests may happen at different times. * Route-based traffic data (updated via `TrafficOnRoute`) uses predictive models, while the traffic flow map feature shows current conditions. ## Data sources and APIs * Real-time traffic visualized on the map is based on [HERE Traffic Vector Tile API](https://www.here.com/docs/bundle/traffic-vector-tile-api-developer-guide/page/README.html). An example of a transaction based on Traffic Vector Tile API is: Render `MapFeatures.TRAFFIC_FLOW` and / or `MapFeatures.TRAFFIC_INCIDENTS` on the map view. Please note that each feature request is counted as an individual transaction. For instance, if a user requests both traffic flow and traffic incident data, this will be considered as two separate transactions by the HERE backend system. By default, new requests are triggered when new vector tiles are loaded during map panning and zooming or when the traffic backend's set validity time expires while the vector tiles are visible on the map view. You can adjust the default refresh period using `MapContentSettings.setTrafficRefreshPeriod(..)`, which allows overriding the backend's validity time to set a refresh period anywhere between 1 and 5 minutes. However, if the map is panned or moved to a new viewport area, for example, during navigation, the HERE SDK will instantly initiate new requests. * Predicted traffic data used for routing and navigation is based on [HERE Traffic API v7](https://www.here.com/docs/bundle/traffic-api-developer-guide-v7/page/README.html). Examples of transactions based on the HERE Traffic API v7: Request traffic flow data or incidents with the `TrafficEngine` or request `TrafficOnRoute` data with the `RoutingEngine`. > #### Note > > For information about the pricing of these features, see the [HERE Base Plan Pricing](https://www.here.com/get-started/pricing). If you are using the Navigate license or have other questions about pricing, [contact us](https://www.here.com/contact). ## Next steps * **[Show traffic on the map](traffic-features.md)**: Use map features to show real-time traffic and incidents on the map view. * **[Traffic Engine](traffic-engine.md)**: Learn how to query traffic incidents and flow information programmatically. * **[Visualize traffic on routes](traffic-render.md)**: Show current traffic conditions along a route. * **[Get ETA and traffic information](routing.md#get-eta-and-traffic-information)**: Calculate routes and retrieve ETA and traffic information from route objects. * **[Update traffic information](traffic-update.md)**: Update traffic during turn-by-turn navigation.