Directions Data Response

This array represents a route or a potential set of alternate routes between 2 or more locations. Output is available in either imperial or metric units.

Properties

distance float
The total calculated distance of this route. (Units: Feet or meters)
time integer
The total calculated time to traverse this route, given the speed provided in the query. (Units: Hours)
polyline array of objects
An array of PolylinePoint objects that can be rendered as a route or trajectory in a map display. This is an array of GPS coordinates represented by latitude and longitude points.
forecastPoints array of objects
An array of DirectionPoint objects that represent a calculated set of points along the route. These can be used for weather forecasting or other time-distributed logic. The points are calculated based on the generated route and the speed provided in the query. Points are generated roughly (but not precisely) corresponding to one hour of travel time.

Sample output

[
  {
    "distance": 722596.188,
    "time": 7.45,
    "polyline": [
      {
        "lat": 41.875563,
        "lng": -87.624336
      },
      ...
    ],
    "forecastPoints": [
      {
        "latitude": 41.875563,
        "longitude": -87.624336,
        "distance": 0.0
      },
      ...
    ]
  },
  ...
]