-1

I want to get travel time betweeen two locations using Google API. I have already spent a couple of hours in sorting this out but no results yet. How do I do this?

stasiaks
  • 1,268
  • 2
  • 14
  • 31
  • 2
    What did you try so far? What kind of *travel time* do you need? Is it using the Directions service? – MrUpsidown Sep 04 '14 at 12:04
  • Did you have a look at the `DirectionsService` class ([see here](https://developers.google.com/maps/documentation/javascript/reference#DirectionsService))? – hennes Sep 04 '14 at 12:14

1 Answers1

1

The Distance Matrix API can get you travel time pretty easily. The documentation for the web services (HTTP interface) gives an example.

You can also use the Javascript API v3 if you'd prefer that. There's another example at the bottom of the page.

If you want travel time in current traffic, you'll need a Google Maps for Business license.

josiekre
  • 795
  • 1
  • 7
  • 19