isValid

fun isValid(): Boolean

Whether the MapboxMap instance is valid.

MapboxMap becomes invalid after MapView.onDestroy is invoked, calling any method then could result in undefined behaviour and will print an error log.

Keeping the reference to an invalid MapboxMap instance introduces significant native memory leak.

Return

True if MapboxMap is valid and false otherwise.