onDistanceToNextInstructionChanged

abstract fun onDistanceToNextInstructionChanged(distance: Distance, instructions: List<GuidanceInstruction>, currentPhase: InstructionPhase)

Called whenever the distance to the next instruction has been updated.

This method is triggered whenever the location update modifies the distance to the upcoming instruction. This allows real-time updates of the distance information for the user.

Parameters

distance

The updated Distance to the next instruction. This provides the remaining distance to the next instruction.

instructions

The ordered list of next instructions along the route.

currentPhase

The current InstructionPhase of the instruction. The value indicates the stage of the current instruction.