I have the following that prompts the user to give location access. On granting permission the user's location is shown and the map loads. I'm trying to find a solution for if the user accidentally denies location access. Can anyone advise?
function onLocationFound(e) {
var radius = e.accuracy / 4;
L.circle(e.latlng, radius).addTo(map);
}
function onLocationError(e) {
alert(e.message);
}
map.on('locationfound'"locationfound", onLocationFound);
map.on('locationerror'"locationerror", onLocationError);
map.locate({ setView: true, maxZoom: 16 });