TransitLeg

data class TransitLeg(distance: Distance, path: PathGeometry, fallbackDuration: Duration?, stops: List<LegStop>, departure: Departure, allServiceOptions: List<Service>, allDepartureOptions: List<Departure>, statuses: List<Status>?, legDepartureTime: Date?, legArrivalTime: Date?, directionDescription: String?, bestBoardingSections: List<BoardingSection>?) : VehicleLeg, HasService

A leg of a Journey involving taking transit. This leg usually represents a specific departure, but may include some information about alternative routes which may be taken.

Only in the case that the departure is a FrequencyDeparture, it may represent an average headway which includes all alternative routes.

Constructors

Link copied to clipboard
fun TransitLeg(distance: Distance, path: PathGeometry, fallbackDuration: Duration?, stops: List<LegStop>, departure: Departure, allServiceOptions: List<Service>, allDepartureOptions: List<Departure>, statuses: List<Status>?, legDepartureTime: Date?, legArrivalTime: Date?, directionDescription: String?, bestBoardingSections: List<BoardingSection>?)

Properties

Link copied to clipboard
val allDepartureOptions: List<Departure>
Link copied to clipboard
val allServiceOptions: List<Service>
Link copied to clipboard
val bestBoardingSections: List<BoardingSection>?
Link copied to clipboard
val departure: Departure
Link copied to clipboard
val directionDescription: String?
Link copied to clipboard
open override val distance: Distance

The total distance along the path of this leg

Link copied to clipboard
val distanceMeters: Double
Link copied to clipboard
val fallbackDuration: Duration?
Link copied to clipboard
val legArrivalTime: Date?
Link copied to clipboard
val legDepartureTime: Date?
Link copied to clipboard
open override val path: PathGeometry

The geographic path this leg traverses

Link copied to clipboard
open override val service: Service

The service which the vehicle used to complete this leg belongs to

Link copied to clipboard
val statuses: List<Status>?
Link copied to clipboard
val stops: List<LegStop>
Link copied to clipboard
open override val travelDuration: Duration?

The time it should take to traverse the path of this leg. This does not include any time spent waiting or boarding at the start of the leg

Link copied to clipboard
val travelDurationSeconds: Int?
Link copied to clipboard
open override val vehicleType: VehicleType