Я использую настоящее устройство Android (версия 5.1)
Я могу определить свою позицию с помощью реактивных карт (правильное положение синей точки на карте внутри моего приложения) + я могу использовать приложение Google Maps и перейти к своей позиции (GPS работает).
Я использую большой тайм-аут, переключая enableHighAccuracy на true и false, удаляя параметры... и т.д. всем не удалось получить данные navigator.geolocation.
Вот мой код:
var options = {
enableHighAccuracy: true,
timeout: 5000,
maximumAge: 0
};
function success(pos) {
var crd = pos.coords;
console.log('Your current position is:');
console.log(`Latitude : ${crd.latitude}`);
console.log(`Longitude: ${crd.longitude}`);
console.log(`More or less ${crd.accuracy} meters.`);
};
function error(err) {
console.warn(`ERROR(${err.code}): ${err.message}`);
};
navigator.geolocation.getCurrentPosition(success, error, options);
Я получаю: ERROR(3): Location request timed out