ne0fite / GigKeeper

GNU General Public License v3.0
1 stars 0 forks source link

Fastest vs. Shortest Route #21

Closed ne0fite closed 7 years ago

ne0fite commented 7 years ago

Currently, the estimation uses the distance matrix endpoint, which always return the fastest route. But this may be longer than the shortest route. Users may want to estimate the shortest route.

  1. Change the estimation to use the directions API and find either the fastest or shortest route based on the user's preference (see below). See http://stackoverflow.com/questions/18574496/google-distance-matrix-json-shortest-path-php for inspiration.
  2. Add profile settings for the driving directions preferences: fastest vs. shortest, avoidance preferences, etc. See https://developers.google.com/maps/documentation/directions/intro#DirectionsRequests for more ideas.
  3. When calculating the route, set the arrival_time to 30 minutes prior to the gig start date and the traffic_model pessimistic. This will use traffic prediction to give a better drive time estimate. The lead time (30 minutes) and traffic_model (pessimistic) could also be profile settings.
ne0fite commented 7 years ago

An alternate solution for this would be to present the user with 1 to 3 route options, let them select the option they want, and save the route description (via I-64 E, etc.) with the gig for future reference. This would be similar to how Google maps works when you get directions.