mapMatchCircuitWaypoints

fun mapMatchCircuitWaypoints(transportationMode: TranspMode = TranspMode.EMERGENCY, waypoints: List<Waypoint>, callback: MapMatchedPointCallback, startUTurnThreshold: Int = 3000)

Performs map-matching for circuit navigation waypoints.

This method is specifically designed for circuit navigation and properly handles offroad sections by using the Waypoint.offroadPolyline information when available.

Map-matching snaps GPS coordinates to road network positions, which is essential for creating accurate circuit routes. This method handles both on-road and off-road sections of the circuit.

Parameters

transportationMode

The transportation mode to use for map-matching (default: EMERGENCY). This affects how waypoints are snapped to the road network.

waypoints

List of Waypoint to map-match for circuit navigation. Each waypoint can optionally contain an Waypoint.offroadPolyline defining an offroad path between waypoints.

callback

Callback that receives the list of map-matched waypoints or an error. See MapMatchedPointCallback for details. The results can be used with Planner.computeRoute to create the circuit route.

startUTurnThreshold

Distance threshold in meters for detecting U-turns at the circuit start point (default: 3000m). Used to properly handle circuit start/end detection.