if ('geolocation' in navigator)
{
navigator.geolocation.getCurrentPosition(function(location){
console.log(location.coords.latitude);
console.log(location.coords.longitude);
console.log(location.coords.altitude);
console.log(location.coords.accuracy);
console.log(location.coords.altitudeAccuracy);
console.log(location.coords.heading);
console.log(location.coords.speed);
console.log(location.timestamp);
});
}