The Google Maps Geocoding API is a service that provides
geocoding and reverse geocoding of addresses.
This service is also available as part of the client-side Google Maps JavaScript API, or for
server-side use with the Java Client, Python Client, Go Client and
Node.js Client for Google Maps Services.
Geocoding is the process of converting
addresses (like a street address) into geographic coordinates (like latitude
and longitude), which you can use to place markers on a map, or position the
map.
Reverse geocoding is the process of converting geographic coordinates into a
human-readable address. The Google Maps Geocoding API's reverse geocoding
service also lets you find the address for a given place ID.
Sample
request and response
You
access the Google Maps Geocoding API through an HTTP interface. Following are
examples of geocoding andreverse geocoding requests.
Geocoding request and response (latitude/longitude lookup)
The
following example requests the latitude and longitude of "1600
Amphitheatre Parkway, Mountain View, CA", and specifies that the output
must be in JSON format.
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY
You
can test this by entering the URL into your web browser (be sure to replace
‘YOUR_API_KEY’ with your actual API key). The response includes the
latitude and longitude of the address.
View
the developer's guide for
more information about building geocoding request URLs and available parameters andunderstanding the response.
No comments:
Post a Comment