You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are samples. Before calling onLocation() I am calling getCurrentPosition(). If there is a current position (and some other things are fullfilled), I start the location subscription. So I assume there are samples in the onLocation() callback? I have tried
if (location.sample == true) {
console.log('- location is a sample');
}
But it never logs anything. I checked the location object, and there is no sample prop in there.
but extras.initialPosition is not in the location object either. How would I find out, which positions in onLocation() are samples from getCurrentPosition()? Or does the module behave in a way that once the sampling is done with getCurrentPosition() and then, afterwards the subscription to onLocation() is set up, the samples from getCurrentLocation() are not passed to onLocation()?
The text was updated successfully, but these errors were encountered:
desiredAccuracy when used with .getCurrentPosition means "If you receive a location with an accuracy <= desiredAccuracy, call that "good enough" and stop sampling"
With {samples: 5, desiredAccuracy: 100}, if the first received location has accuracy 40, the plugin will immediately stop sampling and return that first location as the final location. There will be no reported "samples".
Your Environment
react-native -v
): 0.71.7Expected Behavior & Actual Behavior
I am trying to find out, which points that arrive here
are samples. Before calling
onLocation()
I am callinggetCurrentPosition()
. If there is a current position (and some other things are fullfilled), I start the location subscription. So I assume there are samples in theonLocation()
callback? I have triedBut it never logs anything. I checked the
location
object, and there is nosample
prop in there.I have tried to modify the
getCurrentPosition()
callbut
extras.initialPosition
is not in thelocation
object either. How would I find out, which positions inonLocation()
aresamples
fromgetCurrentPosition()
? Or does the module behave in a way that once the sampling is done withgetCurrentPosition()
and then, afterwards the subscription toonLocation()
is set up, thesamples
fromgetCurrentLocation()
are not passed toonLocation()
?The text was updated successfully, but these errors were encountered: