Another significant announcement at Google IO 2010, was about the new version 3 of the Google Maps API, which has now graduated from Google Labs.
The version 3 API for Google Maps has been designed with speed and smartphones in mind. They are kind of related, since Google found speed an latency to be a roadblock while trying to make v2 of the Google Maps API more friendly to smartphones.
To make these improvements in speed, unfortunately Google has had to sacrifice backwards compatibility, requiring those who have writing their web apps for Google API v2 to rewrite applications for v3 if they want to make use of the new speed improvements. With its graduation, v2 of the API is depreciated -- although it will still be supported for the next three years.
To enable developers to make even better use of their Maps APIs, Google will maintain three versions of the API, a completely frozen stable API version, a version of the API which is undergoing maintenance but no new features are being added, or the completely latest and greatest API version.
Google is also striving to bring the v3 API of Google Maps to parity with v2 by adding back all the features which were missing. Since the new version is a complete rewrite, this is an ongoing process. The most recent features to be added back to the v3 API from the v2 API is street view, which is now entirely implemented in HTML.
Another very popularly requested feature which has been added, is a new “Directions Web Service”. This will allow developers to get directions data in XML or JSON using a simple RESTful interface. This data can be about driving, walking or the recently added biking directions. XML / JSON encoded data about the route can be a obtained by simple request to the http URL for the directions API such as :
http://maps.google.com/maps/api/directions/json?origin=CP,Delhi&destination=Noida,UP&waypoints=Anand Vihar,Delhi|Nehru Place,Delhi&sensor=false
This will generate route data for travelling from CP in Delhi to Noida in UP passing through Anand Vihar and Nehru Place in that order. This will return the data in JSON format, and the final sensor=false specifies that the request is coming from a device without a location sensor. More information about this new service are available here.
Recently Google had also announced a new places feature in maps. Now this data is available to native application developers through a RESTful service called the “Places Web Service“. Like the Directions Web Service, this provides developers with data in JSON or XML format. More information about the new Places Web Service and the Palces Widget here.
Location sensitive applications are only going to become more important as time goes on, and more devices with location sensors come to market. Location is becoming increasingly important not only for mapping application but also any and all applications which can make sense of a location context. With support for geolocation in HTML5, some of the best applications, and most innovative uses of this data still lie ahead.