TTAlongRouteSearch
Objective-C
@interface TTAlongRouteSearch
Swift
class TTAlongRouteSearch
Performs along route search action based on provided query object and returns the result with usage of callback implementation.
-
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 search result is available. It contains a TTAlongRouteSearch object.
Declaration
Objective-C
@property (nonatomic, weak) id<TTAlongRouteSearchDelegate> _Nullable delegate;
Swift
weak var delegate: TTAlongRouteSearchDelegate? { get set }
-
Performs along route search action based on provided query object and returns the result with usage of dlegate callback implementation.
Declaration
Objective-C
- (void)searchWithQuery:(TTAlongRouteSearchQuery *_Nonnull)query;
Swift
func search(with query: TTAlongRouteSearchQuery)
Parameters
query
The object which contains data necessary to execute the search action.
-
Performs along route search action based on provided query object and returns the result with usage of completion handler callback implementation.
Declaration
Objective-C
- (void)searchWithQuery:(TTAlongRouteSearchQuery *_Nonnull)query completionHandler: (void (^_Nonnull)(TTAlongRouteSearchResponse *_Nullable, TTResponseError *_Nullable))completionHandler;
Swift
func search(with query: TTAlongRouteSearchQuery, completionHandler: @escaping (TTAlongRouteSearchResponse?, TTResponseError?) -> Void)
Parameters
query
The object which contains data necessary to execute the search action.
completionHandler
completionHandler CompletionHandler that informs the subscriber when a search result is available. It contains a TTAlongRouteSearchResponse object or error if fails.
-
DEPRECATED
- This method is deprecated, use the async version instead - searchWithQuery:completionHandler:
- The planned withdrawal date is 24.01.2021.
Search with sync result.
Declaration
Objective-C
- (TTAlongRouteSearchResponse *_Nonnull) searchWithQuery:(TTAlongRouteSearchQuery *_Nonnull)query error:(TTResponseError *_Nonnull)error;
Swift
func search(with query: TTAlongRouteSearchQuery, error: TTResponseError) -> TTAlongRouteSearchResponse
Parameters
query
Object containing the data needed to perform a search.
error
TTResponseError
Return Value
return TTAlongRouteSearchResponse object.