->

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)
http://maps.google.co.uk/maps/api/geocode/xml?address=London&sensor=false
New Google Geocoding Web Service

Reverse Geocoding 51.5001524,-0.1262362 (London)
http://maps.google.com/maps/api/geocode/xml?latlng=51.5001524,-0.1262362&sensor=false

Countries Support
http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
Note: en-GB ENGLISH (GREAT BRITAIN) enabled

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)
http://code.google.com/apis/maps/documentation/geocoding/
Official Blog Post
http://googlegeodevelopers.blogspot.com/2010/03/introducing-new-google-geocoding-web.html
Mano Marks (Google Geo Developer Advocate)
http://randommarkers.blogspot.com/2010/03/client-side-geocoding-rocks.html

Full terms and conditions
http://code.google.com/apis/maps/terms.html#section_10_12
Maps API Terms
http://code.google.com/apis/maps/terms.html

Labels: , , , , , ,

1 Comments:

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