Google Maps Geocoding API Documentation
The Google Maps Geocoding API provides a way for you to request the geographic coordinates (latitude and longitude) of a street address. The service is available via HTTP Interface as well as JavaScript SDK.
This API can be used in any application that is looking to geocode addresses for placement of content on a map or display a physical location on a map, and is suitable for applications that use structured input or free-form search strings with complete or partial address information.
To enable the Geocoding service, first set up a project with a billing account and configure it to include the Google Maps Platform products you want to use in your application. Then, in your Cloud Console, go to APIs & Services - Dashboard - Enable APIs & Services and select Maps JavaScript API from the list of available APIs.
You can also configure the service to prioritize forward geocode results that are in a specific language, by using the Accept-Langyage query parameter as described below.
The Geocoding Service supports component filters that can be specified in the componentRestrictions parameter. These filter values support the same methods of spelling correction and partial matching as other geocoding requests.
When the Geocoding Service encounters an error, it returns a status code. The Geocoding response object may contain an additional error_message field that describes the reason for the given status code.
For example, an error message may say that the geocoder was unable to parse the address or the request failed due to an invalid API key. This field can be useful when determining whether the error is the result of the application or the Geocoding Service itself.
Comments
Post a Comment