Magidoc

Leg
Object

Fields

#

accessibilityScore

Computes a numeric accessibility score between 0 and 1.

The closer the value is to 1 the better the wheelchair-accessibility of this leg is. A value of null means that no score has been computed, not that the itinerary is inaccessible.

More information is available in the feature documentation .

agency

For transit legs, the transit agency that operates the service used for this leg. For non-transit legs, null .

alerts

[ Alert ]

Applicable alerts for this leg.

arrivalDelay

For transit leg, the offset from the scheduled arrival time of the alighting stop in this leg, i.e. scheduled time of arrival at alighting stop = `endTime

  • arrivalDelay`

departureDelay

For transit leg, the offset from the scheduled departure time of the boarding stop in this leg, i.e. scheduled time of departure at boarding stop = startTime - departureDelay

distance

The distance traveled while traversing the leg in meters.

dropOffBookingInfo

Special booking information for the drop off stop of this leg if, for example, it needs to be booked in advance. This could be due to a flexible or on-demand service.

dropoffType

This is used to indicate if alighting from this leg is possible only with special arrangements.

duration

The leg's duration in seconds

end

Non-null

The time when the leg ends including real-time information, if available.

endTime

The date and time when this leg ends. Format: Unix timestamp in milliseconds.

fareProducts

Fare products are purchasable tickets which may have an optional fare container or rider category that limits who can buy them or how.

Please read the documentation of id very carefully to learn how a single fare product that applies to multiple legs can appear several times.

from

Non-null

The Place where the leg originates.

generalizedCost

Generalized cost of the leg. Used for debugging search results.

headsign

For transit legs, the headsign that the vehicle shows at the stop where the passenger boards. For non-transit legs, null.

id

An identifier for the leg, which can be used to re-fetch transit leg information, except leg's fare products. Re-fetching fails when the underlying transit data no longer exists. Note: when both id and fare products are queried with Relay , id should be queried using a suitable GraphQL alias such as legId: id . Relay does not accept different fare product ids in otherwise identical legs.

interlineWithPreviousLeg

Interlines with previous leg. This is true when the same vehicle is used for the previous leg as for this leg and passenger can stay inside the vehicle.

intermediatePlace

Whether the destination of this leg (field to ) is one of the intermediate places specified in the query.

intermediatePlaces

[ Place ]

For transit legs, intermediate stops between the Place where the leg originates and the Place where the leg ends. For non-transit legs, null. Returns Place type, which has fields for e.g. departure and arrival times

intermediateStops

[ Stop ]

For transit legs, intermediate stops between the Place where the leg originates and the Place where the leg ends. For non-transit legs, null.

legGeometry

The leg's geometry.

mode

The mode (e.g. WALK ) used when traversing this leg.

nextLegs

[ Leg !]

Future legs with same origin and destination stops or stations

pickupBookingInfo

Special booking information for the pick up stop of this leg if, for example, it needs to be booked in advance. This could be due to a flexible or on-demand service.

pickupType

This is used to indicate if boarding this leg is possible only with special arrangements.

previousLegs

[ Leg !]

Previous legs with same origin and destination stops or stations

realTime

Whether there is real-time data about this Leg

realtimeState

State of real-time data

rentedBike

Whether this leg is traversed with a rented bike.

rideHailingEstimate

Estimate of a hailed ride like Uber.

route

For transit legs, the route that is used for traversing the leg. For non-transit legs, null .

serviceDate

For transit legs, the service date of the trip. Format: YYYYMMDD. For non-transit legs, null.

start

Non-null

The time when the leg starts including real-time information, if available.

startTime

The date and time when this leg begins. Format: Unix timestamp in milliseconds.

steps

[ step ]

The turn-by-turn navigation instructions.

to

Non-null

The Place where the leg ends.

transitLeg

Whether this leg is a transit leg or not.

trip

For transit legs, the trip that is used for traversing the leg. For non-transit legs, null .

walkingBike

Whether this leg is walking with a bike.

Usages

#

References

#

  • Field nextLegs from Leg
  • Field previousLegs from Leg