Skip to content

Instantly share code, notes, and snippets.

@tormjens
Created May 7, 2014 12:27
Show Gist options
  • Save tormjens/cb4a293d2af05db66ba9 to your computer and use it in GitHub Desktop.
Save tormjens/cb4a293d2af05db66ba9 to your computer and use it in GitHub Desktop.
Use a clients internal GPS/location
navigator.geolocation.getCurrentPosition(function(position) {
console.log(position.coords.latitude); // latitude
console.log(position.coords.longitude); // longitude
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment