Is there a way to check if geolocation has been DECLINED with Javascript?
watchPosition and getCurrentPosition both accept a second callback which is invoked when there is an error. The error callback provides an argument for an error object. For permission denied, error.code would be error.PERMISSION_DENIED (numeric value 1). Read more here: https://developer.mozilla.org/en/Using_geolocation Example: navigator.geolocation.watchPosition(function(position) { console.log(“i’m tracking you!”); }, function(error) { if (error.code == error.PERMISSION_DENIED) console.log(“you denied … Read more