HybridReverseGeocoder
public final class HybridReverseGeocoder : ReverseGeocoder
Implementation of ReverseGeocoder that wraps online and offline reverse geocoders.
It orchestrates how the SDK uses the two geocoders to improve the reliability of the reverse geocoding functionality.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a hybrid reverse geocoder
Declaration
Swift
public convenience init( apiKey: String, store: MapDataStore, timeout: Measurement<UnitDuration> = .tt.seconds(5), customAPIURL: URL? = nil ) throwsParameters
apiKeyAPI key for the online reverse geocoder.
storeonboard map data handle.
timeoutthe duration after which primary geocoder results are ignored and the fallback geocoder starts handling the query
customAPIURLcustom base URL for online APIs.
-
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
optionsThe
ReverseGeocoderOptionscompletionParameter completion: The completion closure is called after the response to the request has been processed. If no errors occurred,
ReverseGeocoderResponsecontains an array of categories and subcategories together with their translations and synonyms.
HybridReverseGeocoder Class Reference