TTTrafficIncidents

@interface TTTrafficIncidents : NSObject

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.

  • Delegate that informs the subscriber when a traffic flow result is available. It contains a TTTrafficIncidentsDelegate object.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic)
        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.

  • Cancels the current search request.

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()