TrafficFactory
public enum TrafficFactory
Creates TrafficService
implementation
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a
TrafficService
implementation with the default TomTom traffic provider with the default configuration.Important
This is a Public Preview API. It may be changed or removed at any time.
Throws
An error if creation fails.
Declaration
Swift
public static func create( apiKey: String, store: NDSStore, locationEngine: LocationProvider ) throws -> TrafficService
Parameters
apiKey
API key to access the TomTom Traffic Service.
store
DataStore which is based on an onboard NDS map.
locationEngine
LocationProvider
for tracking position updates.Return Value
A
TrafficService
implementation with the TomTom traffic provider. -
Creates a
TrafficService
implementation with the TomTom TPEG traffic provider.Important
This is a Public Preview API. It may be changed or removed at any time.
Throws
An error if creation fails.
Declaration
Swift
public static func createWithTPEGProvider( store: NDSStore, configuration: TPEGTrafficClientConfiguration, locationEngine: LocationProvider ) throws -> TrafficService
Parameters
store
DataStore which is based on an onboard NDS map.
configuration
Configuration for traffic engine.
locationEngine
LocationProvider
for tracking position updates.Return Value
A
TrafficService
implementation with the TPEG provider.