Google Maps Services Node Client

    Interface DistanceMatrixRowElement

    The information about each origin-destination pairing is returned in an element entry.

    interface DistanceMatrixRowElement {
        distance: Distance;
        duration: Duration;
        duration_in_traffic: Duration;
        fare: TransitFare;
        status: Status;
    }
    Index

    Properties

    distance: Distance

    The total distance of this route, expressed in meters (value) and as text. The textual value uses the unit system specified with the unit parameter of the original request, or the origin's region.

    duration: Duration

    The length of time it takes to travel this route, expressed in seconds (the value field) and as text. The textual representation is localized according to the query's language parameter.

    duration_in_traffic: Duration

    The length of time it takes to travel this route, based on current and historical traffic conditions. See the traffic_model request parameter for the options you can use to request that the returned value is optimistic, pessimistic, or a best-guess estimate. The duration is expressed in seconds (the value field) and as text. The textual representation is localized according to the query's language parameter. The duration in traffic is returned only if all of the following are true:

    • The request includes a departure_time parameter.
    • The request includes a valid API key, or a valid Google Maps APIs Premium Plan client ID and signature.
    • Traffic conditions are available for the requested route.
    • The mode parameter is set to driving.

    If present, contains the total fare (that is, the total ticket costs) on this route. This property is only returned for transit requests and only for transit providers where fare information is available.

    status: Status

    possible status codes

    MMNEPVFCICPMFPCPTTAAATR