Skip to Content

TravelMode

enum TravelMode : Enum<TravelMode>

Defines the mode of transportation used for route calculation and navigation.

Each travel mode carries an estimatedSpeed (in meters per second) that the SDK uses to compute estimated travel time (ETA) along a route. The speed values are averages intended for ETA estimation and do not represent real-time user speed.

Travel modes are serialized to/from JSON via Jackson’s JsonProperty annotations, matching the values expected by the Lazarillo routing API.

See also

RoutingStatusRepository
DEFAULT_TRAVEL_MODE

Entries

DRIVINGDRIVING
Motor vehicle travel. Estimated speed: 6.66 m/s (~24 km/h).
BICYCLINGBICYCLING
Bicycle travel. Estimated speed: 3.0 m/s (~10.8 km/h).
TRANSITTRANSIT
Public transit travel. Estimated speed: 6.66 m/s (~24 km/h).
WALKINGWALKING
Pedestrian travel. Estimated speed: 0.83 m/s (~3 km/h). This is the default mode.

Properties

entries

val entries: EnumEntries<TravelMode>

Returns a representation of an immutable list of all enum entries, in the order they’re declared.

estimatedSpeed

abstract val estimatedSpeed: Double

The average speed for this travel mode, in meters per second.

name

val name: String

ordinal

val ordinal: Int

Functions

valueOf

fun valueOf(value: String): TravelMode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values

fun values(): Array<TravelMode>

Returns an array containing the constants of this enum type, in the order they’re declared.

Last updated on