API Call to Google Maps: We are making an API call to the Google Maps Directions API to get the route information, including traffic data (duration_in_traffic).
Handling Real-Time Traffic: The API request includes departure_time=now and traffic_model=best_guess to ensure real-time traffic data is considered.
Save Traffic Data in Trip: You might need to update your Trip entity to include fields such as trafficDuration and distance. Here’s how to adjust the Trip entity:
All Submissions:
[ ] Have you followed the guidelines stated in README.md file?
[ ] Have you checked to ensure there aren't any other open Pull Requests for the desired changed?
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
After these steps, you're ready to open a pull request.
a. Give a descriptive title to your PR.
b. Describe your changes.
c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).
API Call to Google Maps: We are making an API call to the Google Maps Directions API to get the route information, including traffic data (duration_in_traffic).
Handling Real-Time Traffic: The API request includes departure_time=now and traffic_model=best_guess to ensure real-time traffic data is considered.
Save Traffic Data in Trip: You might need to update your Trip entity to include fields such as trafficDuration and distance. Here’s how to adjust the Trip entity:
All Submissions:
Type of change
Please delete options that are not relevant.
After these steps, you're ready to open a pull request.