Answer the question
In order to leave comments, you need to log in
How to get coordinates in react-native + expo?
I start tracking coordinates in expo
let locat = await Location.startLocationUpdatesAsync('Location',{ accuracy: Location.Accuracy.Balanced,
timeInterval: 1000,
distanceInterval: 0 }, loc => this.setState({ location:loc }));
TaskManager.defineTask('Location', ({ data: { locations }, error }) => {
if (error) {
// check `error.message` for more details.
return;
}
console.log('Received new locations', locations);
});
Answer the question
In order to leave comments, you need to log in
I use for geolocation https://github.com/Agontuk/react-native-geolocatio...
so far the best package I've seen
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question