4

Is it possible to ask Google Maps for an estimated travel time between two points at an arbitrary time in the future?

I routinely use the Google Maps Navigation app on my Droid phone while driving, and it's amazingly useful, especially since it's aware of traffic delays. However, I'd like to get these notifications of traffic delays ahead of schedule, so I know to leave early if the fastest route will take a little longer than usual. Essentially, I'd like to make a version of those radio traffic alerts, except one that's actually useful in that it knows the exact points I'm travelling to and from.

I've searched the docs, and while there's been some similar questions and info on adding traffic overlays to a map, or getting directions, and even getting trip duration, there doesn't seem to be any explicit way to specify when the trip takes place (e.g. when I usually commute).

EDIT: I'm not expecting to get a prediction for a month in the future. Just a couple hours at most.

Community
  • 1
  • 1
Cerin
  • 60,957
  • 96
  • 316
  • 522
  • 1
    Lots of the information used to identify traffic delays is real-time data, no? – Pointy Jun 01 '11 at 14:19
  • 1
    Google knows! Perhaps they can give me notification of stock price changes ahead of schedule too! – Gerrat Jun 01 '11 at 14:20
  • Travel time is additionally route-dependent. Is there a way to supply custom route and get estimated travel times? – pyfork May 19 '16 at 09:04

1 Answers1

2

Doesn't look like it.

The Google Maps API Direction class has a getDuration() method, which the number seconds of the trip duration.

The GDirectionsOptions class doesn't include any temporal methods. It has things like specifying trip type (drive, walk, bus), 'avoid highways' flags, etc.

Even if there were some way to extrapolate the traffic to a future time, there is no method to access the data itself, so you couldn't use it to calculate your own duration anyway.

BryanH
  • 5,826
  • 3
  • 34
  • 47