Closed tousif-v closed 1 week ago
Coordinates are not rounded.
if you’re observing this in the logs, that’s the native Android api Location.toString() method doing that. The raw data provided to you is NOT rounded.
Is there any way to avoid this?
There is no way to tell the Location API to not round coords when printing to the logs.
it’s not important.
Environment
react-native -v
): 0.74.1const location = await BackgroundGeolocation.getCurrentPosition({ extras: { getCurrentPosition: true, }, samples: 1, persist: false, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, timeout: 30, })
`BackgroundGeolocation.ready({ enableHeadless: true, stationaryRadius: 0, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 0, stopTimeout: 5, debug: false, // <-- enable this hear sounds for background-geolocation life-cycle. logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app. startOnBoot: true, // <-- Auto start tracking when device is powered-up.
})`
Expected Behavior
In Android coordinates should not roundoff
Actual Behavior
In Android coordinates are roundoff, only 6 digits after the decimal point (eg. 37.4220936 , -122.083922)