Skip to content

Instantly share code, notes, and snippets.

@Trshant
Created September 2, 2015 13:55
Show Gist options
  • Save Trshant/6f00a7660a5fa60c91bf to your computer and use it in GitHub Desktop.
Save Trshant/6f00a7660a5fa60c91bf to your computer and use it in GitHub Desktop.
To get the latitude and longitude of the place by using the browser
navigator.geolocation.getCurrentPosition(function(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
console.log( latitude , longitude );
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment