Package-level declarations

Types

Link copied to clipboard

Class representing a road camera on the Mapbox platform.

Link copied to clipboard

Enum class representing the type of road cameras on the Mapbox platform.

Link copied to clipboard
class MapboxSpeedZoneInfo(val zoneId: String, val entry: MapboxRoadCamera, val middle: List<MapboxRoadCamera> = emptyList(), val exit: MapboxRoadCamera, val zoneLength: Double, val distanceRemaining: Double? = null, val durationInZone: Duration? = null)

Contains information about a speed zone, including entry, middle, and exit cameras. Provides data about distance, timing, and speed characteristics of the zone. Speed zones represent areas monitored for speed enforcement with cameras at entry, middle, and/or exit points.

Link copied to clipboard
Link copied to clipboard

Observer interface for upcoming road cameras.

Properties

Link copied to clipboard

Calculates the current average speed of the vehicle inside the speed zone in meters per second. Returns null if either duration or distance traveled cannot be determined, or if distance is not positive.

Link copied to clipboard

Converts the average speed within the zone from meters per second to kilometers per hour.

Link copied to clipboard

Calculates the distance traveled within the speed zone in meters. Returns null if the total distance is unknown.

Link copied to clipboard

Current speed limit enforced by the speed zone in meters per second (m/s).

Link copied to clipboard

Extension property to get the speed limit enforced by the road camera in kilometers per hour (km/h).

Converts the speed limit enforced by the speed zone from meters per second to kilometers per hour.

Link copied to clipboard

Extension property to get the speed limit enforced by the road camera in miles per hour (mph).

Link copied to clipboard

Extension property to get the travel time to the road camera in seconds.

Link copied to clipboard

The type of the speed zone, which can be one of the following:

Functions

Link copied to clipboard

Collects upcoming cameras by registering the provided observer. The observer will be automatically unregistered when the coroutine is cancelled.