getStyle

fun getStyle(onStyleLoaded: Style.OnStyleLoaded)

Get the Style of the map asynchronously.

Note: keeping the reference to an invalid Style instance introduces significant native memory leak, see Style.isValid for more details.

Parameters

onStyleLoaded

the callback to be invoked when the style is fully loaded


@JvmName(name = "getStyleDeprecated")
fun getStyle(): Style?

Deprecated

This method is deprecated, and will be removed in next major release. Use [style] property instead.

Replace with

style

Get the Style of the map synchronously, will return null is style is not loaded yet.

Note: keeping the reference to an invalid Style instance introduces significant native memory leak, see Style.isValid for more details.

Return

currently loaded Style object or NULL if it is not loaded.