Getting GeoLocation using HTML

Gopesh9
Posted by Gopesh9 under HTML 5 category on | Points: 40 | Views : 1356
if (navigator.geolocation) 
{
navigator.geolocation.getCurrentPosition
(function(position)
{
var geoLocation = "{ Latitude : " + position.coords.latitude + ", Longitude : " + position.coords.longitude + " with accuracy : " + position.coords.accuracy;
alert(geoLocation);
},
errorHandler);
}

Comments or Responses

Login to post response