Skip to content

Instantly share code, notes, and snippets.

@blewert
Created March 19, 2015 12:10
Show Gist options
  • Select an option

  • Save blewert/d90bc1e20f9ed8111172 to your computer and use it in GitHub Desktop.

Select an option

Save blewert/d90bc1e20f9ed8111172 to your computer and use it in GitHub Desktop.
navigator.geolocation.getCurrentPosition(function(loc)
{
var lat = loc.coords.latitude;
var long = loc.coords.longitude;
var acc = loc.coords.accuracy;
console.log(lat + ", " + long + ", " + acc);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment