Skip to content
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

Merged
merged 5 commits into from
Mar 24, 2016

Conversation

ctmckenna
Copy link

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

also add durationInTraffic to response.
@googlebot
Copy link

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!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@ctmckenna
Copy link
Author

I signed it!

@googlebot
Copy link

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.*;
Copy link
Contributor

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.

Connor McKenna added 2 commits March 7, 2016 09:35
@ctmckenna
Copy link
Author

removed import *, and added javadoc for durationInTraffic field

@domesticmouse
Copy link
Contributor

Can you please add a test that confirms that the traffic_model parameter is included in the outbound request, and the durationInTraffic is populated on the way back in. Thanks!

Connor McKenna added 2 commits March 23, 2016 10:52
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
@ctmckenna
Copy link
Author

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.

@domesticmouse
Copy link
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants