Traffic
Deprecated
This will be removed from future releases after 2027-04-19. Traffic is now created automatically inside the data stores when they are initialized with a valid API key, so a separate traffic client is no longer needed.
This is the public interface for the Traffic Data Provider in NavSDK. This interface can be passed to other components in NavSDK that work with traffic data.
Properties
Functions
Adds a TrafficChangedListener, which reports on changes to the traffic situation.
Synchronously retrieves traffic events in the area specified by the provided GeoBoundingBox. If the call succeeds, returns a TrafficEventsResult. If it fails, returns a TrafficError.
Asynchronously retrieves traffic events in the area specified by the provided GeoBoundingBox object and returns the result in the TrafficEventsCallback.
Removes the previously registered TrafficChangedListener.
Update the traffic client's Locale.
Set a new location provider.
Update the list of routes for which the client is interested in receiving traffic along the route. Providing an empty list disables traffic along the route. It can be enabled again by providing new routes via this method.