MapboxNavigationProvider

object MapboxNavigationProvider

Singleton responsible for ensuring there is only one MapboxNavigation instance. Alternative way of obtaining the instance of the MapboxNavigation is MapboxNavigationApp.

Note that MapboxNavigationProvider and MapboxNavigationApp can't be used together at the same time.

Functions

Link copied to clipboard
fun create(navigationOptions: NavigationOptions): MapboxNavigation

Create MapboxNavigation with provided options. Previously created instance of the MapboxNavigation will be destroyed. Should be called before retrieve.

Link copied to clipboard
fun destroy()

Destroy MapboxNavigation when your process/activity exits.

Link copied to clipboard
fun isCreated(): Boolean

Check if MapboxNavigation is created.

Link copied to clipboard
fun retrieve(): MapboxNavigation

Retrieve MapboxNavigation instance. Should be called after create.