TTTrafficIncidents
Objective-C
@interface TTTrafficIncidents
Swift
class TTTrafficIncidents
TomTom Traffic Incidents API main object. Contains methods to use Tomtom’s online traffic incidents engine and provides support for both async and sync calls.
-
DEPRECATED
- This method is deprecated. Use the ‘initWithKey’ method to init with Key.
- The planned withdrawal date is 15.06.2021.
Initializer with info.plist Key.
Declaration
Objective-C
- (instancetype _Nonnull)init;
Swift
init()
-
Initializer with key for the TomTom Search API Service.
Declaration
Objective-C
- (instancetype _Nonnull)initWithKey:(NSString *_Nonnull)key;
Swift
init(key: String)
-
Delegate that informs the subscriber when a traffic flow result is available. It contains a TTTrafficIncidentsDelegate object.
Declaration
Objective-C
@property id<TTTrafficIncidentsDelegate> _Nullable delegate;
Swift
var delegate: TTTrafficIncidentsDelegate? { get set }
-
IncidentDetailsWithQuery with async callback
Declaration
Objective-C
- (void)incidentDetailsWithQuery:(TTIncidentDetailsQuery *_Nonnull)query;
Swift
func incidentDetails(with query: TTIncidentDetailsQuery)
Parameters
query
Object containing the data needed to perform a traffic incidetns.
-
IncidentDetailsWithQuery with async block
Declaration
Objective-C
- (void)incidentDetailsWithQuery:(TTIncidentDetailsQuery *_Nonnull)query completionHandler: (void (^_Nonnull)(TTIncidentDetailsResponse *_Nullable, int *_Nullable))completionHandler;
Swift
func incidentDetails(with query: TTIncidentDetailsQuery, completionHandler: @escaping (TTIncidentDetailsResponse?, UnsafeMutablePointer<Int32>?) -> Void)
Parameters
query
Object containing the data needed to perform a traffic incidents.
completionHandler
CompletionHandler that informs the subscriber when a traffic incidents result is available. It contains a TTIncidentDetailsResponse object.