TTReverseGeocoder

Objective-C

@interface TTReverseGeocoder

Swift

class TTReverseGeocoder

TomTom Reverse Geocoder API main object. Contains methods to use Tomtom’s online search 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 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 TTReverseGeocoderResponse object.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<TTReverseGeocoderDelegate> _Nullable delegate;

    Swift

    weak var delegate: TTReverseGeocoderDelegate? { get set }
  • Reverse geocoder with async callback

    Declaration

    Objective-C

    - (void)reverseGeocoderWithQuery:(TTReverseGeocoderQuery *_Nonnull)query;

    Swift

    func reverseGeocoder(with query: TTReverseGeocoderQuery)

    Parameters

    query

    Object containing the data needed to perform a search.

  • Reverse geocoder with async block

    Declaration

    Objective-C

    - (void)reverseGeocoderWithQuery:(TTReverseGeocoderQuery *_Nonnull)query
                    completionHandle:
                        (void (^_Nonnull)(TTReverseGeocoderResponse *_Nullable,
                                          TTResponseError *_Nullable))
                            completionHandler;

    Swift

    func reverseGeocoder(with query: TTReverseGeocoderQuery, completionHandle completionHandler: @escaping (TTReverseGeocoderResponse?, TTResponseError?) -> Void)

    Parameters

    query

    The object which contains data necessary to execute the search action.

    completionHandler

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

  • Reverse geocoder with sync result

    Declaration

    Objective-C

    - (TTReverseGeocoderResult *_Nullable)
        reverseGeocoderWithQuery:(TTReverseGeocoderQuery *_Nonnull)query
                           error:(TTResponseError *_Nullable)error;

    Swift

    func reverseGeocoder(with query: TTReverseGeocoderQuery, error: TTResponseError?) -> TTReverseGeocoderResult?

    Parameters

    query

    Object containing the data needed to perform a search.

    error

    TTResponseError

    Return Value

    return TTReverseGeocoderResult object.