Response format
The response to a directions request is a JSON object with the following properties:
origin: A GeoJSON Feature Object with a Point geometry type, representing the starting point of the route. Properties describing the point may be included, including at minimum, a name.
destination: As above, but representing the final destination of the route.
waypoints: An array of GeoJSON Feature Objects, as above, representing intermediate waypoints.
routes: An array of route alternatives, ordered by descending recommendation rank. Each element is a JSON object with the following properties:
distance: The distance traveled by the route, in integer meters.
duration: The estimated travel time, in integer number of seconds.
summary: A short, human-readable summary of of the route (e.g., major roads traversed).
geometry: The geometry of the route, as a GeoJSON LineString. Or, if the geometry parameter is set to polyline, a representation of the same geometry in polyline format with precision 6.
steps: An array of route steps, the smallest unit of a route. A step consists of a maneuver such as a turn or merge, followed by a distance of travel along a single way to the subsequent step. Each element is a JSON object with the following properties: