Я могу определить свое положение с помощью React-native-maps (правильное положение синей точки на карте внутри мое приложение) + я могу использовать приложение 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);
Подробнее здесь: https://stackoverflow.com/questions/473 ... ot-working
Мобильная версия