Google Maps Services Node Client

    Interface TransitDetails

    Transit directions return additional information that is not relevant for other modes of transportation. These additional properties are exposed through the transit_details object, returned as a field of an element in the steps[] array. From the TransitDetails object you can access additional information about the transit stop, transit line and transit agency

    interface TransitDetails {
        arrival_stop: TransitStop;
        arrival_time: Time;
        departure_stop: TransitStop;
        departure_time: Time;
        headsign: string;
        headway: number;
        line: TransitLine;
        num_stops: number;
    }
    Index

    Properties

    arrival_stop: TransitStop

    contains information about the stop for this part of the trip.

    arrival_time: Time

    contain the arrival time for this leg of the journey.

    departure_stop: TransitStop

    contains information about the station for this part of the trip.

    departure_time: Time

    contain the departure time for this leg of the journey.

    headsign: string

    specifies the direction in which to travel on this line, as it is marked on the vehicle or at the departure stop. This will often be the terminus station.

    headway: number

    specifies the expected number of seconds between departures from the same stop at this time. For example, with a headway value of 600, you would expect a ten minute wait if you should miss your bus.

    contains information about the transit line used in this step.

    num_stops: number

    contains the number of stops in this step, counting the arrival stop, but not the departure stop. For example, if your directions involve leaving from Stop A, passing through stops B and C, and arriving at stop D, num_stops will return 3.

    MMNEPVFCICPMFPCPTTAAATR