Skip to content

Instantly share code, notes, and snippets.

@jonathanwork
Created April 9, 2017 22:08
Show Gist options
  • Save jonathanwork/be66d4efb54832b69996912223853749 to your computer and use it in GitHub Desktop.
Save jonathanwork/be66d4efb54832b69996912223853749 to your computer and use it in GitHub Desktop.
geolocation in javascript ;)
navigator
.geolocation
.getCurrentPosition(position=> {
var lat = position.coords['latitude'];
var lng = position.coords['longitude'];
console.log(lat, lng);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment