onInstructionsChanged

abstract fun onInstructionsChanged(instructions: List<GuidanceInstruction>)

Called whenever the next instructions have been changed.

Parameters

instructions

Provides a list of the new instructions ordered by distance. Provided instructions are bounded by GuidanceEngineOptions.instructionDistanceThreshold.

For example, if the threshold is set to 400 meters (the default) and the first instruction has a route offset of 700 meters, the system will include all instructions that fall within the range of 700 + 400 = 1100 meters from the starting point.

Notes:

Example: If two maneuvers are close to each other, but beyond the GuidanceEngineOptions.instructionDistanceThreshold, they are still combined by the guidance system. This behavior is independent of the distance threshold, which only limits how far ahead instructions are considered for selection.