im создать приложение через телефонную связку с кнопкой геолокации.
Если пользователь впервые отказывает в разрешении на геолокацию, как я могу снова запросить разрешение, когда вы снова нажмете кнопку геолокации?
моя структура кода на данный момент:
function getLocation() {
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition, positionError);
} else {
hideLoadingDiv()
showError('Geolocation is not supported by this device')
}
}
function positionError() {
hideLoadingDiv()
showError('Geolocation is not enabled. Please enable to use this feature')
}