RerouteController

interface RerouteController

Reroute controller allows changing the reroute logic externally. Use MapboxNavigation.rerouteController to replace it.

Types

RerouteStateObserver
Link copied to clipboard
fun fun interface RerouteStateObserver
RerouteState observer
RoutesCallback
Link copied to clipboard
fun fun interface RoutesCallback
Route Callback is useful to set new route(s) on reroute event.

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
interrupt
Link copied to clipboard
abstract fun interrupt()
Invoked when re-route is not needed anymore (for instance when driver returns to previous route).
registerRerouteStateObserver
Link copied to clipboard
abstract fun registerRerouteStateObserver(rerouteStateObserver: RerouteController.RerouteStateObserver): Boolean
Add a RerouteStateObserver to collection and immediately invoke rerouteStateObserver with current re-route state.
reroute
Link copied to clipboard
abstract fun reroute(routesCallback: RerouteController.RoutesCallback)
Invoked whenever re-route is needed.
toString
Link copied to clipboard
open fun toString(): String
unregisterRerouteStateObserver
Link copied to clipboard
abstract fun unregisterRerouteStateObserver(rerouteStateObserver: RerouteController.RerouteStateObserver): Boolean
Remove rerouteStateObserver from collection of observers.

Properties

state
Link copied to clipboard
abstract val state: RerouteState
Reroute state