-
Notifications
You must be signed in to change notification settings - Fork 148
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
Sample waypoint to use in the directions service #37
Comments
Have you tried something like the example query in the docs here: You can pass either pipe separated textual destinations or lat,lng. |
I tried calling the url directly... I will try to check this later and will let you know... Thanks though.. |
Hi!, i am trying to use the directions services with waypoints. The origin and destination are the same address and then i have two more address in an array with location like this: |
@leandroz the direction function has changed: if you can provide a test for your case we can look into the issue |
The problem is with the function buildUrl, stringify and how you have to pass the arguments waypoints to Google Maps. See that each waypoints is separated by |, but stringify escaped an array like: querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }) If you prove the test with waypoints it will fail. |
Hi @fabriziomoscon !
What is the proper way to do it? |
Is the right way? |
Google expects waypoints as a string of pipe separated locations. An the library doesn't have any conversion for the input you pass. Please pass something similar to: var waypoints = "Charlestown,MA|Lexington,MA"; |
I have been trying to use directions service with waypoints, but wasn't able to. Could someone please help me out with a sample waypoints array using location coordinates to pass to the directions().
The text was updated successfully, but these errors were encountered: