LegStep

@Serializable
data class LegStep(val geometry: String, val distance: Double, val duration: Double, val durationTypical: Double? = null, val speedLimitUnit: SpeedLimit.Unit? = null, val speedLimitSign: LegStep.SpeedLimitSign? = null, val name: String? = null, val ref: String? = null, val destinations: String? = null, val mode: String, val pronunciation: String? = null, val rotaryName: String? = null, val rotaryPronunciation: String? = null, val maneuver: StepManeuver, val voiceInstructions: List<VoiceInstructions>? = null, val bannerInstructions: List<BannerInstructions>? = null, val drivingSide: String? = null, val weight: Double, val intersections: List<StepIntersection>? = null, val exits: String? = null)

Includes one StepManeuver object and travel to the following LegStep.

Since

1.0.0

Constructors

Link copied to clipboard
constructor(geometry: String, distance: Double, duration: Double, durationTypical: Double? = null, speedLimitUnit: SpeedLimit.Unit? = null, speedLimitSign: LegStep.SpeedLimitSign? = null, name: String? = null, ref: String? = null, destinations: String? = null, mode: String, pronunciation: String? = null, rotaryName: String? = null, rotaryPronunciation: String? = null, maneuver: StepManeuver, voiceInstructions: List<VoiceInstructions>? = null, bannerInstructions: List<BannerInstructions>? = null, drivingSide: String? = null, weight: Double, intersections: List<StepIntersection>? = null, exits: String? = null)

Types

Link copied to clipboard
class Builder(geometry: String, distance: Double, duration: Double, mode: String, maneuver: StepManeuver, weight: Double)

Builder class for creating LegStep instances.

Link copied to clipboard

Properties

Link copied to clipboard

If in your request you set MapboxDirections.Builder#bannerInstructions() to true, you'll receive a list of BannerInstructions which encompasses all information necessary for creating a visual cue about a given LegStep.

Link copied to clipboard
val destinations: String? = null

String with the destinations of the way along which the travel proceeds.

Link copied to clipboard

The distance traveled from the maneuver to the next LegStep in meters.

Link copied to clipboard
@SerialName(value = "driving_side")
val drivingSide: String? = null

The legal driving side at the location for this step. Result will either be left or right.

Link copied to clipboard

The estimated travel time from the maneuver to the next LegStep in seconds.

Link copied to clipboard
@SerialName(value = "duration_typical")
val durationTypical: Double? = null

The typical travel time for traversing this LegStep in seconds. There's a delay along the LegStep if you subtract this durationTypical() value from the LegStep duration() value and the resulting difference is greater than 0. The delay is because of any number of real-world situations (road repair, traffic jam, etc).

Link copied to clipboard
val exits: String? = null

String with the exit numbers or names of the way. Optionally included, if data is available.

Link copied to clipboard

Gives the geometry of the leg step as encoded polyline string.

Link copied to clipboard

Provides a list of all the intersections connected to the current way the user is traveling along.

Link copied to clipboard

A StepManeuver object that typically represents the first coordinate making up the LegStep.geometry.

Link copied to clipboard

indicates the mode of transportation in the step.

Link copied to clipboard
val name: String? = null

String with the name of the way along which the travel proceeds.

Link copied to clipboard
val pronunciation: String? = null

The pronunciation hint of the way name. Will be undefined if no pronunciation is hit.

Link copied to clipboard
val ref: String? = null

Any road designations associated with the road or path leading from this step's maneuver to the next step's maneuver. Optionally included, if data is available. If multiple road designations are associated with the road, they are separated by semicolons. A road designation typically consists of an alphabetic network code (identifying the road type or numbering system), a space or hyphen, and a route number. You should not assume that the network code is globally unique: for example, a network code of "NH" may appear on a "National Highway" or "New Hampshire". Moreover, a route number may not even uniquely identify a road within a given network.

Link copied to clipboard
@SerialName(value = "rotary_name")
val rotaryName: String? = null

An optional string indicating the name of the rotary. This will only be a nonnull when the maneuver type equals rotary.

Link copied to clipboard
@SerialName(value = "rotary_pronunciation")
val rotaryPronunciation: String? = null

An optional string indicating the pronunciation of the name of the rotary. This will only be a nonnull when the maneuver type equals rotary.

Link copied to clipboard

Speed limit sign type.

Link copied to clipboard

Speed limit unit as per the locale.

Link copied to clipboard

The voice instructions object is useful for navigation sessions providing well spoken text instructions along with the distance from the maneuver the instructions should be said.

Link copied to clipboard

Specifies a decimal precision of edge weights, default value 1.

Functions

Link copied to clipboard

Creates a builder initialized with the current values of the LegStep instance.