09 March 2010

New Google Geocoding Web Service

New Google Geocoding Web Service

The service is now 'not limited' but you are required to show the results on a Google Map.
Examples given to help user understand the importance of this update.
Lots of updated content and improvement from feedbackNew Service v3 Geocoding
  • Unlimited Usage*
  • Status Codes (in Plain English!)
  • Java Support (Parsing XML with XPath)
"*Note: the geocoding service may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited."
[2,500 requests may be sent to the Geocoding Web Service per day from a single IP address]

but purley for example based on the official example given
Geocoding London (UK)
New Google Geocoding Web Service

Reverse Geocoding 51.5001524,-0.1262362 (London)

Countries Support

New Status Codes - now in Plain English
  • "OK" indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned. example
  • "ZERO_RESULTS" indicates that the geocode was successful but returned no results. This may occur if the geocode was passed a non-existent address or a latlng in a remote location. example
  • "OVER_QUERY_LIMIT" indicates that you are over your quota. (your geocoding too fast!)
  • "REQUEST_DENIED" indicates that your request was denied, generally because of lack of a sensor parameter. example
  • "INVALID_REQUEST" generally indicates that the query (address or latlng) is missing. example
Now for the new content:

geometry contains the following information:

* location contains the geocoded latitude,longitude value. For normal address lookups, this field is typically the most important.
*location_type stores additional data about the specified location. The following values are currently supported:
o "ROOFTOP" indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision.
o "RANGE_INTERPOLATED" indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.
o "GEOMETRIC_CENTER" indicates that the returned result is the geometric center of a result such as a polyline (for example, a street) or polygon (region).
o "APPROXIMATE" indicates that the returned result is approximate.
* viewport contains the recommended viewport for displaying the returned result, specified as two latitude,longitude values defining the southwest and northeast corner of the viewport bounding box. Generally the viewport is used to frame a result when displaying it to a user.
* bounds (optionally returned) stores the bounding box which can fully contain the returned result.

Java Support
Parsing XML with XPath

Although it is not as lightweight as JSON, XML does provide more language support and more robust tools. Code for processing XML in Java, for example, is built into the javax.xml packages
please see http://code.google.com/apis/maps/documentation/geocoding/#XMLParsing for full details.

Full Documentation (updated)
Official Blog Post
Mano Marks (Google Geo Developer Advocate)

Full terms and conditions
Maps API Terms

Labels: , , , , , ,


At Tuesday, March 09, 2010 2:25:00 pm, Blogger Unknown said...

You can replace xml? with json? in the request if you'd rather have a json response. I would.


Post a Comment

<< Home