I want to render the directions between tow point (current location, passed location)
I'm using Linking to open the Google Maps App when clicking the button I passed the (lat, long), I want to see in the map.
so just when the Maps App open they get me to the Location I passed without display the destination between my current location and other address and without any Markers, any idea how to solve these?
Here is my Code
_openMap = () => {
const { region } = this.state;
console.log('open directions');
// Linking.openURL('geo:37.484847,-122.148386');
Linking.canOpenURL(`geo:${region.latitude},${region.longitude}`).then(supported => {
if (supported) {
Linking.openURL(`geo:${region.latitude},${region.longitude}`);
} else {
alert('sorry invalid url')
}
});
}