For example i have 3 locations, I need to google maps directions with linking URL,
locations = [
{
lat : 1.310494,
long : 103.815954
},
{
lat : 1.301569,
long : 103.785721
},
{
lat : 1.278916,
long : 103.825573
},
]
how can i use this params locations tobe waypoint to open the google maps app
2
Answers
i slove with this url
https://www.google.com/maps/dir/1.310494,103.815954/1.301569,103.785721/1.278916,103.825573/
location.map((item)=>{
return (
<Pressable
onPress={() =>
Linking.openURL(
https://www.google.com/maps/search/?api=1&query=${item.lat},${item.long}
,)
}>
);
})