ReverseGeocoderOptions
public struct ReverseGeocoderOptions
Defines the input to the reverse geocoder.
-
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init( position: CLLocationCoordinate2D, heading: Measurement<UnitAngle>? = nil, radius: Measurement<UnitLength> = .tt.meters(500), locale: Locale = Locale.current, roadUses: Set<RoadUse> = [], areaTypes: Set<AreaType> = [], preferClosestAccurateAddress: Bool = false, fetchGeometry: Bool = false )Parameters
positionA coordinate to reverse geocode.
headingThe directional heading of the vehicle in degrees when it is traveling along a segment of roadway.
radiusThe maximum distance from the specified position that the reverse geocoder will deliver results for. Default value: 500 meters
localeThe preferred locale. Defaults to the user’s current locale.
roadUsesRestricts reverse geocoding to certain types of road uses.
areaTypesSpecifies the level of filtering performed on geographies.
preferClosestAccurateAddressGives the preference to the closest accurate address over the address with the closest coordinates to route to.
fetchGeometryEnables the inclusion of geometry shapes for the provided reverse geocoding results.
-
Describes the error that might occur when building options.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum ValidationError : Error -
A coordinate that will be translated into a human-understandable street address, street element, or geography.
Declaration
Swift
public let position: CLLocationCoordinate2D -
The directional heading of the vehicle in degrees when it is traveling along a segment of roadway. Zero is North, 90 is East and so on.
Note
the value should be in range of 0…360Declaration
Swift
public var heading: Measurement<UnitAngle>? -
The maximum distance from the specified position for which the reverse geocoder delivers results. Default value: 500 meters.
Note
the value should be in range of 1…5000 metersDeclaration
Swift
public var radius: Measurement<UnitLength>? -
The preferred locale. Defaults to the user’s current locale.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var locale: Locale -
Restricts reverse geocoding to certain types of road uses.
Declaration
Swift
public var roadUses: Set<RoadUse> -
Specifies the level of filtering performed on geographies. Providing this parameter narrows the search to specified geography area types. The resulting response will contain the geography ID as well as the matched area type. This ID is a token that can be used to get the geometry of that geography. The following parameters are ignored when
areaTypesis set:heading,roadUses.Declaration
Swift
public var areaTypes: Set<AreaType> -
Gives the preference to the closest accurate address over the address with the closest coordinates to route to.
Declaration
Swift
public var preferClosestAccurateAddress: Bool -
Enables the inclusion of geometry shapes for the provided reverse geocoding results. [areaTypes] must be set and the smallest available geometry is used.
Declaration
Swift
public var fetchGeometry: Bool
ReverseGeocoderOptions Structure Reference