getObserver

fun <T : MapboxNavigationObserver> getObserver(kClass: KClass<T>): T

Provides access to any registered observer instance. If multiple instances of the same class have been registered, the first observer will be returned.

Throws

when the class has not been registered.