HiredVehicleLeg

data class HiredVehicleLeg(distance: Distance, travelDuration: Duration?, vehicleType: VehicleType, service: Service, instructionSegments: List<InstructionSegment>?, pathAnnotations: List<PathAnnotation>?, path: PathGeometry, vehiclePickupOptions: List<VehiclePickupOption>, vehicleDropoffOptions: List<VehicleDropoffOption>) : SelfPilotedLeg, HasService

A leg where the user drives or rides a vehicle which they hire at the start of the leg, represented by the service.

Constructors

Link copied to clipboard
fun HiredVehicleLeg(distance: Distance, travelDuration: Duration?, vehicleType: VehicleType, service: Service, instructionSegments: List<InstructionSegment>? = null, pathAnnotations: List<PathAnnotation>? = null, path: PathGeometry, vehiclePickupOptions: List<VehiclePickupOption> = emptyList(), vehicleDropoffOptions: List<VehicleDropoffOption> = emptyList())

Properties

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
open override val instructionSegments: List<InstructionSegment>? = null

A list of turn-by-turn instructions where the user needs to navigate along this leg. Each segment represents a consecutive part of the path

Link copied to clipboard
open override val path: PathGeometry

The geographic path this leg traverses

Link copied to clipboard
open override val pathAnnotations: List<PathAnnotation>? = null

Extra metadata about sections of the path. For instance, in Legs with travel_mode of self_piloted, these annotations can indicate sections of the path where the user should dismount their vehicle and walk

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 suggestedVehicleDropoffOption: VehicleDropoffOption?
Link copied to clipboard
val suggestedVehiclePickupOption: VehiclePickupOption?
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
val vehicleDropoffOptions: List<VehicleDropoffOption>
Link copied to clipboard
val vehiclePickupOptions: List<VehiclePickupOption>
Link copied to clipboard
open override val vehicleType: VehicleType