getDistance Undefined
ginxx009 opened this issue · 2 comments
ginxx009 commented
import {getDistance} from 'geolib';
const computedDistance = () => {
console.log(computeDistance());
}
const computeDistance = () => {
getDistance(
{ latitude: 51.5103, longitude: 7.49347 },
{ latitude: "51° 31' N", longitude: "7° 28' E" }
);
}
<TouchableOpacity onPress={() => computedDistance()} style={styles.AddDeliveryButton}>
<Text>Add delivery details</Text>
</TouchableOpacity>
This gives me an undefined value . Why?
Cmoen11 commented
Same issue, did you solve this?
ginxx009 commented
I moved on and find a way using MapViewDirection . hahahaha