Skip to content

Instantly share code, notes, and snippets.

@sydlawrence
Created September 25, 2013 22:03
Show Gist options
  • Save sydlawrence/6706680 to your computer and use it in GitHub Desktop.
Save sydlawrence/6706680 to your computer and use it in GitHub Desktop.
Get User Location
navigator.geolocation.getCurrentPosition(function(result) {
var location = data.coords;
// This now consists of:
// latitude
// longitude
// altitude (if avaiable)
// various other attributes
// do something with location
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment