isUserOffRoute

fun isUserOffRoute(mapLibreNavigation: MapLibreNavigation, location: Location, routeProgress: RouteProgress, callback: OffRouteCallback): Boolean

This method checks if off route detection is enabled or disabled.

If enabled, the off route engine is retrieved from MapLibreNavigation and OffRouteDetector.isUserOffRoute is called to determine if the location is on or off route.

Return

true if on route, false otherwise

Parameters

mapLibreNavigation

current running navigation instance

location

new location

routeProgress

to be used in off route check

callback

only used if using our default OffRouteDetector