I have the code
navigator.permissions.query({name:'geolocation'}).then(function(result) {
if (result.state === 'granted') {
getLocation();
} else if (result.state === 'prompt') {
console.log('не решено');
} else{
getLocation();
}
// Don't do anything if the permission was denied.
});
If user get permission to geolocation - load block, if not - in block I have a button "get permission to geolocation". Its work on android, but iOS not support navigator.permissions.query
. How can I check permitions in iOS not used getCurrentPosition
with page load?