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

bad accuracy #322

Open hoseinfo opened 2 years ago

hoseinfo commented 2 years ago

hi I test with highaccuracy:true

and I don't get good accuracy....

does any body has any solution for it?

cybergears commented 2 years ago

why dont you try enableHighAccuracy prop

artstylee commented 2 years ago

same issue i tried enableHighAccuracy: true and the position error is about 2km

gouravrc commented 2 years ago

same here. Accuracy is poor. { distanceFilter:0.01,interval:5000, enableHighAccuracy: true, timeout: 5000, maximumAge: 10000 }

Want to know if it supports high accurate coords, example inside a room?

Edited: Inside a room, I am getting position err ~ 20-30 mts

tri-hariyadi commented 2 years ago

same issue i tried { enableHighAccuracy: true, timeout: 15000, maximumAge: 10000 } miss position up to 2km

cybergears commented 2 years ago

I dont know why people are complaining about accuracy. I use this lib in my project and accuracy is very high.

use enableHighAccuracy: true

and ACCESS_FINE_LOCATION permission in android manifest file

Lavhe commented 2 years ago

I managed to fix the issue by removing the ACCESS_COARSE_LOCATION permission from the AndroidManifest.xml file

HugoGresse commented 1 year ago

I tried switching to this lib, in production the accuracy dropped a lot (around 300m). Removing ACCESS_COARSE_LOCATIN improved slightly but still ~120m. So I reverted back to https://github.com/react-native-community/react-native-geolocation version 2 (accuracy 15m) Also, the "react-native-geolocation" has a new maintener which is great news.

Accuracy where average calculated on 1 millions users for a few days each times.

lutakyn commented 4 months ago

Yes I agree to what @HugoGresse suggested, I was getting accuracy of 2000, after switching to react-native-geolocation, I'm getting accuracy of 25 which is better

HugoGresse commented 4 months ago

@react-native-community/geolocation has a new v3 version which also bring the Play geolocation API. I did not test the differences though, will do later this year, but I had no issue when updating the library from v2 to v3 in term of accuracy or compatibility (still runing the Android Legacy geolocation API)