Request location coordinates after user has blocked access in javascript
As mentioned by @matthew-shwery, you can not change the permission.
the best you could do is check for the permission and notify the user is the permission is denied
navigator.permissions.query({ name: 'geolocation' }).then(function(result) { if (result.state == 'granted') { report(result.state); geoBtn.style.display = 'none'; } else if (result.state == 'prompt') { report(result.state); geoBtn.style.display = 'none'; navigator.geolocation.getCurrentPosition(revealPosition, positionDenied, geoSettings); } else if (result.state == 'denied') { report(result.state); geoBtn.style.display = 'inline'; } result.onchange = function() { report(result.state); } });
You can't.
The user must manage their browser settings manually because your site is added to a blacklist when denied location permissions.
Here are instructions for Chrome users to manage their location permissions: https://support.google.com/chrome/answer/142065?hl=en