TomTomSDKTraffic
-
Interface to the Traffic Data Provider.
Navigation SDK components use the Traffic interface to access traffic information. For example,
TomTomSDKRoutePlannerOffline.OfflineRoutePlanneruses it to calculate routes that avoid traffic.An instance of this interface is created with
TomTomSDKTrafficEngine.TrafficFactory.Once a traffic data provider instance is created and connected to a source of traffic, it will start receiving traffic data as offered by the provider. For example, near the current location, along the route, or for the current country/area. If a route is registered via the
Traffic.updateRoutesForTrafficfunction, the traffic data provider will start receiving traffic information for the given route. When new traffic events are received, the traffic data provider will notify the user via theTrafficUpdateObserverinterface, provided that an observer is registered via theTraffic.addObserverfunction. Users can fetch traffic in an area via theTraffic.trafficEventsandTraffic.getTrafficEventsfunctions.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public protocol Traffic : AnyObject
-
Defines the Traffic Service public interface
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public typealias TrafficService = Traffic -
See more
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public protocol TrafficUpdateObserver : AnyObject
TomTom SDK for iOS (0.40.0)
TomTomSDKTraffic