Skip to content

Instantly share code, notes, and snippets.

@DiegoPinho
Created April 28, 2018 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiegoPinho/bfc42012f85dfb3cbe84e0f27052fdec to your computer and use it in GitHub Desktop.
Save DiegoPinho/bfc42012f85dfb3cbe84e0f27052fdec to your computer and use it in GitHub Desktop.
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showLocation, function(error) {
alert("error! :(");
console.log(error);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment