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

watchPosition is not working fine on iPhone 6 #286

Open ArchanaSharma95 opened 3 years ago

ArchanaSharma95 commented 3 years ago

I am getting the wrong positions on iPhone 6 and it creates the wrong map for me. I am just having an issue on "iPhone 6", it's working fine on other iOS devices.

This is my watchPosition function::

this.watchId = Geolocation.watchPosition(async (response) => {
    // watch position res handled
}, (error) => {
    this.onGeolocationErrorOccurCallback(error);
}, {
    accuracy: {
        android: 'high',
        ios: 'best',
    },
    enableHighAccuracy: true,
    distanceFilter: 5,
    showLocationDialog: true,
});

screenshot of map:: screenshot-2021 06 16-17_15_51

Agontuk commented 3 years ago

Not related to the package, we don't have custom logic for different type of devices. Maybe iPhone 6 can't get a proper location fix and reporting inaccurate results. Best option would be to filter out the results using kalman filter