Leg
@Serializable
A single leg of an itinerary, travelled with one transit mode between two destinations.
Constructors
Link copied to clipboard
constructor(start: Destination, end: Destination, transitMode: TravelMode, distance: Double, duration: Double, coordinates: List<@Serializable(with = CompressedCoordinateSerializer::class) Coordinate>, steps: List<Step>)
Properties
Link copied to clipboard
@SerialName(value = "coords")
The coordinates describing the geometry of the leg.
Link copied to clipboard
The destination at which the leg ends.
Link copied to clipboard
The destination at which the leg starts.
Link copied to clipboard
The transit mode used to travel the leg.
Functions
Link copied to clipboard
Returns the leg's endpoints and totals, with coordinates and steps reduced to their sizes.