HTML5 Geolocation
The HTML5 Geolocation API is used to get the geographical position of a user.
Since this can compromise user privacy, the position is not available unless the user approves it.
Use the getCurrentPosition() method to get the user's position.
The example is a simple Geo-location example returning the latitude and longitude of the user's position: