Leg

sealed class Leg

A Leg represents a section of a Route traversed using a single mode of travel

The various concrete leg types (e.g. walk, hired vehicle) are represented by a sealed class hierarchy

Properties

Link copied to clipboard
abstract val distance: Distance

The total distance along the path of this leg

Link copied to clipboard
val distanceMeters: Double
Link copied to clipboard
abstract val path: PathGeometry

The geographic path this leg traverses

Link copied to clipboard
abstract 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?

Inheritors

Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun Leg.getLegPathSegments(fractionalIndexProgress: Float): PathGeometrySegments
Link copied to clipboard
fun Leg.isSelfPiloted(): Boolean
Link copied to clipboard
fun Leg.isWalk(): Boolean