localities Geocode Lat Lng
Geocode a locality or Reverse Geocode a latlng Provides details for an address or a geographic position. Either parameter address
or latlng
is required.
Return
LocalitiesGeocodeCollectionResponse
Parameters
The latlng parameter is used for reverse geocoding, it’s required if the address
parameter is missing. (optional)
A grouping of places to which you would like to restrict your results. Components can be used to filter over countries. Countries must be passed as an ISO 3166-1 Alpha-2 or Alpha-3 compatible country code. For example: components=country:fr
or components=country:fra
would restrict your results to places within France and components=country:fr-fr
returns locations only in Metropolitan France. Multiple countries must be passed as multiple country:XX
filters, with the pipe character (|
) as a separator. For example: components=country:gb|country:fr|country:be|country:sp|country:it
would restrict your results to city names or postal codes within the United Kingdom, France, Belgium, Spain and Italy. (optional)
The language code, using ISO 3166-1 Alpha-2 or Alpha-3 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use english as default language. No language necessary for postal_code
request. (optional)
Used to limit the returning fields when type=address (by default, and for other types localities, all fields are return). Only one field is available: geometry
. By using this parameter you will limit content of responses to the geometry part. No address component will be returned. (optional)
Two values for this parameter: standard
or advanced
. By default, if the parameter is not defined, value is set as standard
. The advanced
value opens suggestions to worldwide postal codes in addition to postal codes for Western Europe. A dedicated option subject to specific billing on your license is needed to use this parameter. Please contact us if you are interested in using this parameter and you do not have subscribed the proper option yet. (optional)
To specify the format for the short country code expected to be returned in the address_components field. Default is the format used to specify components
or alpha2
if no components are specified. (optional)
allows to retrieve all addresses at the same location for a common street number or building. Results may contain an additional key "sub_buildings" with "public_id" and "description" values for every addresses at the same location sharing the same address components. (optional)
Throws
If the request is not correctly configured
Rethrows the OkHttp execute method exception
If the API returns an informational or redirection response
If the API returns a client error response
If the API returns a server error response