react-native-geolocation
react-native-geolocation copied to clipboard
getCurrentPosition options affects previously triggered watchPosition
Environment
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 170.01 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.8.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 16, 17, 18, 19, 24, 25, 26, 27, 28
Build Tools: 25.0.2, 27.0.3, 28.0.3
System Images: android-16 | Google APIs Intel x86 Atom, android-17 | ARM EABI v7a, android-25 | Intel x86 Atom, android-25 | Intel x86 Atom_64, android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-26 | Intel x86 Atom, android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.4 => 0.61.4
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Platforms
iOS
Versions
- Android:
- iOS: 9.0 ~ 13.5 (most recent)
- react-native-geolocation:
- react-native: 0.61.4
- react: 16.9.0
Description
I have an app that watches for constant user location updates, so when they start the session we call watchPosition
and pass a distance filter of say 1000
. Then independently the user can request actions that are based on their exact location, which we get it calling getCurrentPosition
without distanceFilter
. The issue here is: the second call seems to override the value of distanceFilter
of the ongoing watchPosition
updates, which suddenly become 100
(default value).
Shouldn't both calls be independent? the options on getCurrentPosition
should not affect watchPosition
and vice-versa.
any update?
Unfortunately nothing so far @lyseiha.
I ended up working around it by setting the same settings on my watchPosition
and getCurrentPosition
. Would like to fix it but have been quite busy lately, if it keeps on dragging and nobody else fix it I'll look into creating a PR in the next months when I get more time.