Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Geolocation watchPosition
navigator.geolocation.watchtPosition(function (position) {
var pos = "Latitude: " + position.coords.latitude +
" Longitude: " + position.coords.longitude;
function buttonClickHandler() {
// Cancel the updates when the user clicks a button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment