TTTrafficFlow
Objective-C
@interface TTTrafficFlow
Swift
class 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.
-
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 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 TrafficFlowDelegate object.
Declaration
Objective-C
@property 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.