forwardMapboxNavigation
fun forwardMapboxNavigation(attach: (MapboxNavigation) -> Unit, detach: (MapboxNavigation) -> Unit): MapboxNavigationObserver
Content copied to clipboard
This extension removes boilerplate from a class that needs to use MapboxNavigation, and it makes your class appear as if it implements MapboxNavigationObserver without exposing the functions.
val navigationObserver = mapboxNavigationForward(this::onAttached, this::onDetached)
private fun onAttached(mapboxNavigation: MapboxNavigation)
private fun onDetached(mapboxNavigation: MapboxNavigation)
Content copied to clipboard