Skip to content

Instantly share code, notes, and snippets.

@phpmaps
Created March 3, 2024 18:03
Show Gist options
  • Save phpmaps/70497b1ed667495ecc4fe962c80c590d to your computer and use it in GitHub Desktop.
Save phpmaps/70497b1ed667495ecc4fe962c80c590d to your computer and use it in GitHub Desktop.
Permission denied Geolocation
navigator.geolocation.watchPosition(function(position) {
console.log("i'm tracking you!");
},
function(error) {
if (error.code == error.PERMISSION_DENIED)
console.log("you denied me :-(");
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment