onShouldUpdateToIndex

open override fun onShouldUpdateToIndex(legIndex: Int, stepIndex: Int)

This callback will fire when the OffRouteDetector determines that the user location is close enough to a org.maplibre.navigation.core.models.LegStep.

This allows to the OffRouteDetector to either go steps back or multple steps forward.

You can use this for advanced navigation scenarios, by default you probably don't need this.