-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported link when using more than one waypoint #29
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
In index.js under react-native-google-maps-directions directory in node_modules if you change the method |
@kristianmilev1 I don't really see the difference in your code.. |
There is an issue with multiple waypoints. I guess when we use Linking.openURL(url) with no escaped characters like So just copy code
to
|
I tried this @alexeyvax, and multiple waypoints are working for me now 💪 |
RN version: 0.60
Package version: 2.1.1
This is the data I supplay to getDirections method:
const data = { source: { latitude: Number(checkpoints[0].address.lat), longitude: Number(checkpoints[0].address.lng), }, destination: { latitude: Number(checkpoints[numOfCheckpoints - 1].address.lat), longitude: Number(checkpoints[numOfCheckpoints - 1].address.lng), }, params: [ { key: 'travelmode', value: 'driving', // may be "walking", "bicycling" or "transit" as well }, { key: 'dir_action', value: 'navigate', // this instantly initializes navigation using the given travel mode }, ], waypoints: [ { latitude: 39.810355, longitude: -86.135126 }, { latitude: 40.810355, longitude: -86.135126 }, ], }
I'm getting error inside maps: Google maps can't open this link.
When I use only one waypoint it works fine though.
I have my url in log:
'https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=39.881652%2C-83.057822&origin=41.925685%2C-88.122813&waypoints=39.810355,-86.135126|40.810355,-86.135126'
The text was updated successfully, but these errors were encountered: