TTTrafficFlow

@interface TTTrafficFlow

TomTom Traffic Flow API main object. Contains methods to use Tomtom’s online traffic flow 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 TrafficFlowDelegate object.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) id<TrafficFlowDelegate> _Nullable delegate;

    Swift

    var delegate: TrafficFlowDelegate? { get set }
  • FlowSegmentDataWithQuery with async callback

    Declaration

    Objective-C

    - (void)flowSegmentDataWithQuery:(TTFlowSegmentDataQuery *_Nonnull)query;

    Swift

    func flowSegmentData(with query: TTFlowSegmentDataQuery)

    Parameters

    query

    Object containing the data needed to perform a traffic flow.

  • FlowSegmentDataWithQuery with async block

    Declaration

    Objective-C

    - (void)flowSegmentDataWithQuery:(TTFlowSegmentDataQuery *_Nonnull)query
                   completionHandler:
                       (void (^_Nonnull)(TTFlowSegmentDataResponse *_Nullable,
                                         int *_Nullable))completionHandler;

    Swift

    func flowSegmentData(with query: TTFlowSegmentDataQuery, completionHandler: @escaping (TTFlowSegmentDataResponse?, UnsafeMutablePointer<Int32>?) -> Void)

    Parameters

    query

    Object containing the data needed to perform a traffic flow.

    completionHandler

    CompletionHandler that informs the subscriber when a traffic flow result is available. It contains a TTFlowSegmentDataResponse object.