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
I am currently working with the @react-native-community/geolocation library in my project, which uses React Native version 0.68.0 and React version 17. The setup for the library works well in general, but I am encountering an issue where the latitude and longitude values fluctuate or are sometimes inaccurate, particularly on Android devices.
Despite the setup being correct, I am unable to consistently retrieve accurate coordinates, which affects the functionality of the app. Could you kindly suggest any solutions or best practices to resolve this issue and ensure more reliable geolocation accuracy?
Thank you for your help, and I look forward to your guidance.
async ConfirmLocation(type) {
this.setState({
selectedImageBase4: '',
avatarSource: '',
remarksNote: '',
});
Geolocation.getCurrentPosition(
async (position) => {
const { latitude, longitude, accuracy } = position.coords;
this.setState({ newLatLong: position });
if (this.state.flag == '0') {
this.setState({ isLoading: true, latitude, longitude });
} else {
this.setState({ isLoading: true, CheckOutLat: latitude, CheckOutLong: longitude });
}
}
The text was updated successfully, but these errors were encountered: