Leg interface

An interface representing Leg.

Properties

departures

Relevant for Public Transit and Wait legs only

destination

The walk/bike leg’s destination.

geometry
legEndTime

End time for the leg.

legStartTime

Start time for the leg.

legType

The travel mode of the leg. Possible values include: 'Walk', 'Bicycle', 'Tram', 'Subway', 'Rail', 'Bus', 'Ferry', 'Cable', 'Gondola', 'Funicular', 'PathWayWalk', 'Wait', 'WaitOnVehicle'

line

In case of a public transit leg, the line serving this leg.

lineGroup

In case of a public transit leg, the line group serving this leg.

origin

The walk/bike leg’s origin.

steps

In case of walk or bike leg, the directions.

stops

List of stops comprising the line’s route within the leg (e.g. the stops the leg passes through).

waitOnVehicle

Indicates whether it’s necessary to wait for the next leg on the same vehicle (i.e. the bus will only change its line number).

Property Details

departures

Relevant for Public Transit and Wait legs only

departures?: LineArrival[]

Property Value

destination

The walk/bike leg’s destination.

destination?: LegPoint

Property Value

geometry

geometry?: LineString

Property Value

legEndTime

End time for the leg.

legEndTime?: string

Property Value

string

legStartTime

Start time for the leg.

legStartTime?: string

Property Value

string

legType

The travel mode of the leg. Possible values include: 'Walk', 'Bicycle', 'Tram', 'Subway', 'Rail', 'Bus', 'Ferry', 'Cable', 'Gondola', 'Funicular', 'PathWayWalk', 'Wait', 'WaitOnVehicle'

legType?: LegType

Property Value

line

In case of a public transit leg, the line serving this leg.

line?: Line

Property Value

lineGroup

In case of a public transit leg, the line group serving this leg.

lineGroup?: LineGroup

Property Value

origin

The walk/bike leg’s origin.

origin?: LegPoint

Property Value

steps

In case of walk or bike leg, the directions.

steps?: Step[]

Property Value

Step[]

stops

List of stops comprising the line’s route within the leg (e.g. the stops the leg passes through).

stops?: Stop[]

Property Value

Stop[]

waitOnVehicle

Indicates whether it’s necessary to wait for the next leg on the same vehicle (i.e. the bus will only change its line number).

waitOnVehicle?: string

Property Value

string