Skip to content

Instantly share code, notes, and snippets.

@edwardloveall
Created November 20, 2012 18:45
Show Gist options
  • Save edwardloveall/4120049 to your computer and use it in GitHub Desktop.
Save edwardloveall/4120049 to your computer and use it in GitHub Desktop.
Get location in JS
location_callback = function(location) {
console.log(location);
}
navigator.geolocation.getCurrentPosition(location_callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment