Google Blogoscoped

Friday, August 22, 2008

Google Releases Geolocation Features for Ajax API, Gears

Google provides a neat new way for you to grab the user’s location information via JavaScript. It’s the ClientLocation property of their Ajax API. All you need is a free API key, and then you can load their JavaScript file in your HTML, and access the properties city, country, country code, region, and latitude/ longitude (where available, that is – the values may not always be found by Google, and Google disclaims they are only “approximate”). With this information in hand you can then feed it back to other services, including the Google Maps API, or say an image search for the city name – take a look at the example page called “Where are you?” I’ve created. The only thing officially missing seems to be a server-side way to access the geolocation data.

In other geolocation news, Google released a Geolocation module for their Gears API. Google in their blog post on this says the data returned here is more precise than what the Ajax API delivers, as it “can use the cell-ID of nearby cell towers or on-board GPS (if either is available)”. However, for this to work users need to have the Google Gears plug-in installed on either their desktop or their mobile system.

Google continues trying to make their open-sourced Gears more useful to web developers, but what’s in it for them? Well, the more useful Gears becomes as a plug-in the more likely it will be pre-installed on systems in the future – which increases the control Google has over the browser environment, which in turn enables them to more quickly launch initiatives which make the web in general and their tools more powerful without the need to go through years of industry lobbying/ standardization/ browser updating & deployment processes. As with other initiatives in which Google tries to speed up deployment of frameworks which hold the power to benefit them, the Google branding is de-emphasized here. For instance, you won’t find a big Google logo on the Free the Airwaves homepage, the Android homepage, the Open Handset Alliance, or the OpenSocial blog, even when Google is either owner or major party in these projects. And take a look at how the Gears project changed its name and logo from “Google Gears” to just “Gears” over time (while adjusting the motto from “Enabling Offline Web Applications” to the more general “Improving Your Web Browser”):

Google’s boss Eric Schmidt is a self-proclaimed Machiavelli fan, and Machiavelli once posed the question of whether for a leader it’s better to be feared or loved. I think Google answered the question for themselves: in today’s free-roaming web environment, it’s clearly much better for them to be loved.

[Via Reto.]


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!