Pages

Monday, May 31, 2010

Know your location without GPS (Geolocation)

I was fascinated by the Google I/O day one session specially the HTML5 capabilities and Geolocation feature in the latest browsers.

Last weekend I thought of combining the this feature with The Google Geocoding API. In fact I used the  Reverse Geocoding (Address Lookup) to determine the approximate Address of your current location from the Latitude and longitude information gathered by the Geolocation feature .

Note this works only in the latest Firefox (v 3.5 and above) and the latest Google Chrome , Safari and Opera Browser.Internet Explorer yet to implement this.

The below link works well in India as long as you are in an urban place (Metros and important cities).

 

http://neilghosh.com/blog/wp-content/uploads/2011/01/share1.jpgutil/geo/

 

You have to click on “share Location”  in firefox or “Accept” in Chrome at the top of the page , before it sends your location information to server.

share

Used xls to transform the xml returned (with Ajax) by the Google Geocoding API and show as HTML content.

Test the above link and let me know (via comment ) how accurate it gives for your place.(at least it points to my building).