Repository navigation
Closed
Labels
API: GeolocationBugStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 4.02 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.1.0 - /usr/local/bin/node
npm: 6.0.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
Description
I'm making a generic google map (for now) with live user location:
navigator.geolocation.watchPosition(
({coords}) => {
const {latitude, longitude} = coords
this.setState({
position: {
latitude,
longitude,
},
region: {
latitude,
longitude,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}
})
},
(error) => alert(JSON.stringify(error)),
{enableHighAccuracy: true, timeout: 20000, maximumAge: 0, distanceFilter: 0}
)
However, the current position's update rate is very slow--at about 5-8 second/update.
I'm not entirely sure if this is a bug or an expected behavior, but I've built a similar app using ionic + google map javascript api and the update rate is real-time, so I don't think this 5-8 second/update rate is normal.
Reproducible Demo
Please check out my issue branch to reproduce the app/bug.
Reacted by Sebastijan Stevanović and Angelos Lechouritis
Metadata
Metadata
Assignees
Labels
API: GeolocationBugStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.

Activity
react-native-bot commentedon Sep 12, 2018
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.
The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running
react-native infoon a project using the latest release.davidwwu commentedon Sep 21, 2018
As I’m digging around, looks like the
enableHighAccuracyoption is somehow not working properly because I can get accurate returns fromwatchPositionincludingheading,speed, andaccuracyif I open other map apps such as Google Maps and iOS’ Maps and jump back to my app. But it only operates for a few seconds before it starts returning the “less accurate” results (most noticibleaccuracyjumps from10to65and of course the much less often location return rate).MariamMobeen commentedon Mar 22, 2019
How did you solve it?
stale commentedon Aug 2, 2019
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stale commentedon Aug 9, 2019
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.