The term "Address Resolution" usually refers to converting a human-readable address into a location on a map.Conversely, the process of converting a location on a map to a human-readable address is called "Reverse Address Resolution ".
Google geocoding API supports direct uselatlng
Parameters for Reverse Address Resolution. For example, the following query contains the latitude/longitude value of a location in Brooklyn:
http://maps.google.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true_or_false
Note:latlng
Make sure that there is no space between the latitude value and the longitude value.
The query returns the following results:
{ "status": "OK", "results": [ { "types": [ "street_address" ], "formatted_address": "275-291 Bedford Ave, Brooklyn, NY 11211, USA", "address_components": [ { "long_name": "275-291", "short_name": "275-291", "types": [ "street_number" ] }, { "long_name": "Bedford Ave", "short_name": "Bedford Ave", "types": [ "route" ] }, { "long_name": "New York", "short_name": "New York", "types": [ "locality", "political" ] }, { "long_name": "Brooklyn", "short_name": "Brooklyn", "types": [ "administrative_area_level_3", "political" ] }, { "long_name": "Kings", "short_name": "Kings", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "New York", "short_name": "NY", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "United States", "short_name": "US", "types": [ "country", "political" ] }, { "long_name": "11211", "short_name": "11211", "types": [ "postal_code" ] } ], "geometry": { "location": { "lat": 40.7142298, "lng": -73.9614669 }, "location_type": "RANGE_INTERPOLATED", "viewport": { "southwest": { "lat": 40.7110822, "lng": -73.9646145 }, "northeast": { "lat": 40.7173774, "lng": -73.9583193 } } } }, ... Additional results[]
...
Note that the reverse address parser returns multiple results. Result"formatted_addresses"
It not only refers to the communication address, but also includes all the methods for location naming. For example, if you want to resolve an address in the city of Chicago, the address resolution point can be marked as its street address, city (Chicago), State (Illinois), or country (United States ). These are all "addresses" for the address parser ". The Reverse Address parser can return any of these types of addresses as valid results.
The Reverse Address parser will match the political entity (country/region, province, city, and adjacent area), street address, and zip code.
Theformatted_address
The complete list of values is as follows.
"formatted_address": "275-291 Bedford Ave, Brooklyn, NY 11211, USA", "formatted_address": "Williamsburg, NY, USA", "formatted_address": "New York 11211, USA", "formatted_address": "Kings, New York, USA", "formatted_address": "Brooklyn, NY, USA", "formatted_address": "New York, NY, USA", "formatted_address": "New York, USA", "formatted_address": "United States"
Generally, the address is returned in the order of height to height. The most precise address is returned as the most significant result. This is the case in this example. Please note that we have sent back different addresses, from very specific street addresses to more general political entities, such as neighboring areas, cities, counties, States/provinces. If you want to match a wider range of addresses, you may need to check
Placemark
Of"types"
Field (see the preceding address components ).
Note: Reverse Address Resolution provides the estimation result. The address parser tries to find the nearest addressable location within a certain deviation range. If no matching item is found, the address parser usually does not return the result.