TrafficFactory
public enum TrafficFactory
Creates an instance of the TomTomSDKTraffic.Traffic
interface.
Important
This is a Public Preview API. It may be changed or removed at any time.Creates a TomTomSDKTraffic.Traffic
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
-> Traffic
Parameters
apiKey
|
API key to access the TomTom Traffic Service. |
store
|
DataStore which is based on an onboard NDS map. |
locationEngine
|
|
Return Value
A TomTomSDKTraffic.Traffic
implementation with the TomTom traffic provider.
Creates a TomTomSDKTraffic.Traffic
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
-> Traffic
Parameters
store
|
DataStore which is based on an onboard NDS map. |
configuration
|
Configuration for traffic engine. |
locationEngine
|
|
Return Value
A TomTomSDKTraffic.Traffic
implementation with the TPEG provider.