TTRoute

@interface TTRoute : NSObject

TomTom Route API main object. Contains methods to use Tomtom’s online route engine and provides support for both async and sync calls.

  • Route with async block

    Declaration

    Objective-C

    - (void)planRouteWithQuery:(TTRouteQuery *_Nonnull)query
             completionHandler:(void (^_Nonnull)(TTRouteResult *_Nullable,
                                                 int *_Nullable))completionHandler;

    Swift

    func plan(with query: TTRouteQuery, completionHandler: @escaping (TTRouteResult?, UnsafeMutablePointer<Int32>?) -> Void)

    Parameters

    query

    Object containing the data needed to perform a route query.

    completionHandler

    CompletionHandler that informs the subscriber when a route result is available. It contains a TTRouteResult object.

  • Route with async callback

    Declaration

    Objective-C

    - (void)planRouteWithQuery:(TTRouteQuery *_Nonnull)query;

    Swift

    func plan(with query: TTRouteQuery)

    Parameters

    query

    Object containing the data needed to perform a route query.

  • Cancels the current routing request

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()