tiaanduplessis / react-native-google-maps-directions

🚕 Get direction using Google Maps in React Native 🚗
MIT License
182 stars 28 forks source link

Support for multiple waypoints and optimizeWayPoints #4

Closed tugrulcan closed 5 years ago

tugrulcan commented 7 years ago

Hi, Firstly thank you for this great package. Is it possible for you to add support for multiple waypoints and optimize option?

tiaanduplessis commented 7 years ago

Hi. I'm quite busy at the moment, but will look into implementing it as soon as I have time 👍

tugrulcan commented 7 years ago

I've implemented my version using yours. It generates the following url: http://maps.google.com/maps?saddr=38.43882333333333,27.202935000000004&daddr=1901.%20Sk.%20No:43,%20Saruhan%20Mahallesi,%2045010%20Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:Oktay%20Erol%20Pulcuo%C4%9Flu%20Cd.%20No:8,%2045030%20Ke%C3%A7ilik%C3%B6y%20Osb/Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:Manisa%20TOK%C4%B0%20Konutlar%C4%B1%20No:3,%20Uncubozk%C3%B6y%20Mahallesi,%2045030%20Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:5619.%20Sk.%20No:2,%20Ke%C3%A7ili%20K%C3%B6y%20Mahallesi,%2045030%20Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:Vali%20Azizbey%20Cd.%20No:34,%2075.%20Y%C4%B1l%20Mahallesi,%2045030%20Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:43.%20Sk.%20No:23,%20Turgut%20%C3%96zal%20Mahallesi,%2045040%20Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:308.%20Sk.%20No:130,%20Kaz%C4%B1m%20Karabekir%20Mahallesi,%2045040%20%C5%9Eehzadeler/Manisa,%20T%C3%BCrkiye+to:1803.%20Sk.%20No:7,%20%C3%87ar%C5%9F%C4%B1%20Mahallesi,%2045010%20Manisa%20Merkez/Manisa,%20T%C3%BCrkiye+to:Muradiye%20Mah.%20Manolya%20Sokak%20No:234%20Yunusemre%20-%20Manisa&dirflg=d This generated url works on web browsers. But my problem occurs when I pass this url to Linking method. Linking.openURL(url); Google maps application does not opens the link as in browsers. Any idea about it?

tiaanduplessis commented 7 years ago

@donovantc any thoughts?

donovantc commented 7 years ago

Hey @tugrulcan,

is this the url that gets generated by this package?

When I try this url in the browser, it cannot find one of the points but I don't think that is the issue.

Could you share the data that you pass as a parameter to getDirections(data)?

Aboukinane commented 5 years ago

@tugrulcan i have made a PR now it supports waypoints , awaiting approval ...

tiaanduplessis commented 5 years ago

In 2.1.0