FasterRoute

abstract class FasterRoute

This class can be subclassed to provide custom logic for checking / determining new / faster routes while navigating.

To provide your implementation, set it on the MapLibreNavigation constructor

FasterRoute.shouldCheckFasterRoute determines how quickly a new route will be fetched by RouteFetcher.

FasterRoute.isFasterRoute determines if the new route retrieved by RouteFetcher is actually faster than the current route.

Since

0.9.0

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun isFasterRoute(response: DirectionsResponse, routeProgress: RouteProgress): Boolean

This method will be used to determine if the route retrieved is faster than the one that's currently being navigated.

Link copied to clipboard
abstract fun shouldCheckFasterRoute(location: Location, routeProgress: RouteProgress): Boolean

This method determine if a new DirectionsResponse should be retrieved by RouteFetcher.