Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.6k stars 291 forks source link

getPosition geolocation is not precise #293

Open emanuelesalati opened 3 years ago

emanuelesalati commented 3 years ago

Hi, i have a problem: i use react-native-geolocation-service for geolocation. Sometimes, but not always, the geolocation is not precise, the first call always, ( accuracy is more variable i don't understand the value ) why?

This is my code:

Geolocation.getCurrentPosition( currentLocation => { const { coords } = currentLocation; console.log("coords: ", coords); },error => { console.log(error, 'error') }, { accuracy : 'high', enableHighAccuracy: true, timeout: 15000, maximumAge: 10000, distanceFilter: 0, forceRequestLocation: true }

Can you please any suggestion?

Emanuele Salati

ahron1 commented 3 years ago

I often see the same thing. The first call gets a good accuracy 5-10 meters. Then for some reason it gets a terrible accuracy. It seems to me that the first call fetches the "fine" location, and then it gets the "coarse" location.

botondus commented 2 years ago

I always seem to get bad accuracy on Android but on iPhone, it works ok. Not sure what is happening.