NavigationViewApi

abstract class NavigationViewApi

Api that gives you the ability to change the state of NavigationView.

Constructors

Link copied to clipboard
fun NavigationViewApi()

Functions

Link copied to clipboard
abstract fun getCurrentVoiceInstructionsPlayer(): MapboxVoiceInstructionsPlayer?

Access the current instance of MapboxVoiceInstructionsPlayer created by NavigationView.

Link copied to clipboard
abstract fun isReplayEnabled(): Boolean

Checks if the current trip is being simulated.

Link copied to clipboard
abstract fun recenterCamera()

If the camera is idle or in overview mode, calling this function will dispatch an action that will reposition the camera back to the user locaiton indicator (as if the recenter button was clicked).

Link copied to clipboard
abstract fun routeReplayEnabled(enabled: Boolean)

Enable/Disable replay trip session based on simulated locations.

Link copied to clipboard
abstract fun startActiveGuidance(): Expected<NavigationViewApiError, Unit>

Request NavigationView to enter active navigation state.

abstract fun startActiveGuidance(routes: List<NavigationRoute>): Expected<NavigationViewApiError, Unit>

Sets routes and request NavigationView to enter active navigation state. Last DirectionsWaypoint location will be used as the destination.

Link copied to clipboard
abstract fun startArrival(): Expected<NavigationViewApiError, Unit>

Request NavigationView to enter arrival state.

abstract fun startArrival(routes: List<NavigationRoute>): Expected<NavigationViewApiError, Unit>

Sets routes and request NavigationView to enter arrival state. Last DirectionsWaypoint location will be used as the destination.

Link copied to clipboard
abstract fun startDestinationPreview(point: Point)

Sets a point as destination and request NavigationView to enter destination preview state.

Link copied to clipboard
abstract fun startFreeDrive()

Clear route data and request NavigationView to enter free drive state.

Link copied to clipboard
abstract fun startRoutePreview(): Expected<NavigationViewApiError, Unit>

Request NavigationView to enter route preview state.

abstract fun startRoutePreview(routes: List<NavigationRoute>): Expected<NavigationViewApiError, Unit>

Sets preview routes and request NavigationView to enter route preview state. Last DirectionsWaypoint location will be used as the destination.