Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Geolocation get current position
navigator.geolocation.getCurrentPosition(function (position) {
var pos = "Latitude: " + position.coords.latitude +
" Longitude: " + position.coords.longitude;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment