CurrentLegAnnotation

data class CurrentLegAnnotation(val index: Int, val distanceToAnnotation: Double, val distance: Double, val duration: Double?, val speed: Double?, val maxSpeed: MaxSpeed?, val congestion: String? = null)

This class represents the current annotation being traveled along at a given time during navigation.

The Mapbox Directions API gives a list of annotations, each item in the list representing an annotation between two points along the leg.

Since

0.13.0

Constructors

Link copied to clipboard
constructor(index: Int, distanceToAnnotation: Double, distance: Double, duration: Double?, speed: Double?, maxSpeed: MaxSpeed?, congestion: String? = null)

Properties

Link copied to clipboard
val congestion: String? = null

The congestion for the given annotation segment.

Link copied to clipboard

The distance, in meters, for the given annotation segment.

Link copied to clipboard

Distance along the org.maplibre.navigation.core.models.RouteLeg that adds up to this set of annotation data.

Link copied to clipboard

The speed, in meters per second, for the given annotation segment.

Link copied to clipboard
val index: Int

The index used to retrieve the annotation values from each array in org.maplibre.navigation.core.models.

Link copied to clipboard

The posted speed limit, for the given annotation segment. Maxspeed is only available for the mapbox/driving and mapbox/driving-traffic profiles, other profiles will return unknowns only.

Link copied to clipboard

The speed, in meters per second, for the given annotation segment.