-
Notifications
You must be signed in to change notification settings - Fork 947
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
Allow Non-Stopover Waypoints #93
Comments
Thanks for the FR. I'm not going to be able to get to this in the next couple of weeks but if anyone else wants to send a pull request through I'd be happy to take a look at it. |
@pcoughran could you propose an API interface that would make sense for this use case? I have done a bit thinking of how best to expose this in the API, but would love your thoughts. Thank you! |
Javascript API has |
how do I set up stopover=false in the sample request? I would like duration_in_traffic to be returned in every leg, and via: prefix does not add a leg entry. |
How about this: We currently have String and LatLng waypoint variants in DirectionsApiRequest.
We could add a Waypoint class, and a
The DirectionsApiRequest's internal |
I like your proposal @apjanke. Feel free to put together a PR for your preferred approach if you have time, otherwise I'll loop back and implement when I get a spare moment. Thanks! |
Here's a PR: #468. I made Waypoint a nested class in DirectionsApiRequest, since that seems consistent with the existing design. NOTE: In my design, the isStopover flag defaults to true, instead of false like I said previously. I misspoke: it should default to true, I think, since that's the current default behavior for String and LatLng waypoint arguments. |
From https://developers.google.com/maps/documentation/directions/ -->
You can use waypoints to influence your route without adding a stopover by prefixing the waypoint with via:. Waypoints prefixed with via: will not add an additional leg to the route.
Sample Request:
The text was updated successfully, but these errors were encountered: