Dexterology

HTML 5 Geo Location API

Posted by Pranay on Tuesday, September 7th, 2010

ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray   With recent facebook feature of geo  tagging, geo location is becoming a hot field in internet world, considering the future aspects of geo location HTML5 specification has added a new Geolocation API which helps in mapping the exact location of any user to offer personalize location based services. Lets take a dive into [...]

continue reading

Google Android Live CD by Live Android

Posted by Pranay on Tuesday, August 17th, 2010

ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray   You can go and buy an android power phone like Droid or nexus one to try your hands on android, or you can install the Android SDK which comes with a phone emulator. But do you want to try Google android without installing the SDK or buying the phone? Live android helps you [...]

continue reading

GooReader read Google Books on your Desktop

Posted by Pranay on Saturday, August 14th, 2010

ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray   Gooreader is a windows application that brings Google books on your desktop. There are lots of books and magazines that are available free on Google books, but Google books web interface is not that great. GooReader allows you to search, read, and even download the books and magazines you find. It enhance the [...]

continue reading

HTML 5 Geo Location API

Posted by Pranay on Tuesday, September 7th, 2010

 

Geo-location-apps With recent facebook feature of geo  tagging, geo location is becoming a hot field in internet world, considering the future aspects of geo location HTML5 specification has added a new Geolocation API which helps in mapping the exact location of any user to offer personalize location based services.

Lets take a dive into how this geolocation API works and what you can do with this.  Geolocation tells you where the user is it is not of much relevance for him knowing his current position. You can track a users current location by embedding just 2 line of javascript

navigator.geolocation.getCurrentPosition(callmeonSuccess, callmeonError, options);

 

This 2 lines of code will give you the current location, the callmeonSuccess function will be called with position parameter passed which is then used to extract the lat long etc. Here is the code which will give you the lat and long for any user

function callmeonSuccess(position) {

var lat = position.coords.latitude;

var lng = position.coords.longitude; }

Yes with this simple line of code you can get the lat and long of any user. There are various other options which you can extract from position.  You can play with this API and check with different parameter by going on this link.

You can see the stand alone version of the example application integrated with Google maps on my website.

There are lot of good examples and uses of this geo location feature you can find something similar on html5rocks, I am exploring the possibilities of how to use this feature and in my upcoming posts I will try to put some content related to the same.

You can read the specification of geo location tracking form W3C website. They use a set of GPS, satellite mobile phone tower position IP etc for getting the exact location.

What will you do if you get the location of visitor who is visiting your webpage? post it in your comments.

Thanks

Pranay

Posted in: HTML5, Utility, featured.

Leave a Reply

  • Categories



Zomato
  Domain Name + 1GB Linux India Web Hosting in Rs.349