Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dom/js navigator object get geolocation user
navigator.geolocation.getCurrentPosition(function(location) {
console.log(location.coords.latitude);
console.log(location.coords.longitude);
console.log(location.coords.accuracy);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment