TTAlongRouteSearch

@interface TTAlongRouteSearch : NSObject

Performs along route search action based on provided query object and returns the result with usage of callback implementation.

  • Delegate that informs the subscriber when a search result is available. It contains a TTAlongRouteSearch object.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        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
          withAsyncDelegate:(id<TTAlongRouteSearchDelegate> _Nonnull)delegate;

    Swift

    func search(with query: TTAlongRouteSearchQuery, withAsyncDelegate delegate: TTAlongRouteSearchDelegate)

    Parameters

    query

    The object which contains data necessary to execute search action

    delegate

    Delegate that informs the subscriber when a search result is available. It contains a TTAlongRouteSearch object. @deprecated This method is deprecated, use searchWithQuery without passing delegate here instead.

  • 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 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 search action

    completionHandler

    completionHandler CompletionHandler that informs the subscriber when a search result is available. It contains a TTAlongRouteSearchResponse object or error if fails.

  • 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.

  • Cancels the current along route search request.

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()