-
Notifications
You must be signed in to change notification settings - Fork 949
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
distance matrix request - add traffic_model to request and durationInTraffic to response #139
Conversation
also add durationInTraffic to response.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
import com.google.maps.model.TransitRoutingPreference; | ||
import com.google.maps.model.TravelMode; | ||
import com.google.maps.model.Unit; | ||
import com.google.maps.model.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert this change? We don't used star imports, per the Google Java style guide lines.
also add durationInTraffic to response.
removed import *, and added javadoc for durationInTraffic field |
Can you please add a test that confirms that the |
Test that durationInTraffic is returned in the response. Sending pessimistic traffic model, but not checking that pessimistic traffic model's durationInTraffic is longer than optimistic traffic model
create distanceMatrixRequest with pessimistic traffic model, and make sure the 'traffic_model' parameter with value 'pessimistic' was added to the params table before making the request
I just pushed a test case. It verifies that traffic_model was included in the outbound request by checking the params table. I also manually checked that it was included in the get request. |
Thank you! |
google returns durationInTraffic in response to distance matrix requests, so adding that to DistanceMatrixElement. Also adding ability to specify traffic model for distance matrix requests