Skip to content

Instantly share code, notes, and snippets.

@rishispeets
Created April 25, 2017 13:23
Show Gist options
  • Save rishispeets/e9338eabb8c83adb54460c6e342c60dc to your computer and use it in GitHub Desktop.
Save rishispeets/e9338eabb8c83adb54460c6e342c60dc to your computer and use it in GitHub Desktop.
dom/js navigator object get geolocation user
navigator.geolocation.getCurrentPosition(function(location) {
console.log(location.coords.latitude);
console.log(location.coords.longitude);
console.log(location.coords.accuracy);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment