Closed adhendo closed 3 years ago
@adhendo We are also using react-native-geolocation-service in conjunction with this library and default to enableHighAccuracy: true
. We previously used @mauron85/react-native-background-geolocation, but react-native-geolocation-service seems to be working out better for us.
Origin and destination should be passed in as an array with longitude first (all of MapBox, including API calls, require longitude before latitude), i.e.
origin={[location.lng, location.lat]}
destination={[jobDestination.lng, jobDestination.lat]}
@bachhuberdesign Hey thanks for the response! Just wanted to say I've also been trying out (https://www.npmjs.com/package/expo-location) even though I'm not really using expo and it seems to be working just as good as react-native-geolocation-service with a slightly simpler interface. Haven't noticed a difference yet and I'm using the accuracy set to best for navigation
.
Hello all, I was just wondering how everyone is using this library in their application and how they are handling the passing of the origin and destination props. Right now we are using react-native-geolocation-service with
enableHighAccuracy
set totrue
for the origin prop to get the users current location. What is everyone else using for this?Also how is everyone passing in the lat/long array to this package? Passing in an object and converting it into an array? Directly passing in an array of the lat/long?
Thanks this would be a huge help!!