Structure

DirectionsResponse

The directions and estimated travel time returned for a route.

Declaration

dictionary DirectionsResponse {
    DirectionsRequest request;
    Route[] routes;
};

Overview

When the route function is called, a DirectionsResponse is returned asynchronously via a callback function. This callback function is invoked with two arguments, error and data on failure and success. error contains an error code and text description of the error. data is a DirectionsResponse object, with the properties request and routes.

Topics

Directions Response

request

The request object associated with this response.

routes

An array of route objects.

See Also

Getting Directions

route

Retrieves directions and estimated travel time based on the specified start and end points.

DirectionsRequest

The requested start and end points for a route, as well as the planned mode of transportation.

Route

Information about a route, including step-by-step instructions, distance, and estimated travel time.

RouteStep

A single route between a requested start and end point.