OnlineReverseGeocoder
public final class OnlineReverseGeocoder : ReverseGeocoder
The Geo Coder is a REST wrapper for a suite of web services that allow developers to use our scalable geo coder engine.
-
OnlineReverseGeocoder
‘s initializer.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public convenience init(apiKey: String, customAPIURL: URL? = nil, geopoliticalView: String? = nil)
Parameters
apiKey
a valid TomTom API Key.
customAPIURL
custom base URL for online APIs.
geopoliticalView
the country code in the ISO 3166-1 alpha-2 format whose view on disputed areas should be used. If not provided, or not supported, the international geopolitical view will be used.
-
Reverse Geocoding API gives users a tool to translate a coordinate (for example: 37.786505, -122.3862) into a human-understandable street address, street element, or geography.
Declaration
Swift
public func reverseGeocode( options: ReverseGeocoderOptions, completion: @escaping (Result<ReverseGeocoderResponse, Error>) -> () )
Parameters
options
The
ReverseGeocoderOptions
completion
Parameter completion: The completion closure is called after the response to the request has been processed. If no errors occurred,
ReverseGeocoderResponse
contains an array of places that were geocoded from a coordinate.