MTStyle

class MTStyle(reference: MTMapReferenceStyle, variant: MTMapStyleVariant? = null) : MTStylable

The proxy object for the current map style.

Set of convenience methods for style, sources and layers manipulation. MTStyle is null until map loading is complete.

Constructors

constructor(reference: MTMapReferenceStyle, variant: MTMapStyleVariant? = null)

Properties

Current reference style of the map object.

Current style variant of the map object.

Functions

fun addLayer(layer: MTLayer)

Adds a layer to the map.

open override fun addMarker(marker: MTMarker)

Adds the marker to the map.

fun addSource(source: MTSource)

Adds a source to the map.

open override fun addTextPopup(popup: MTTextPopup)

Adds a text popup to the map.

Disables the 3D terrain visualization.

Enables the globe projection visualization.

Enables the mercator projection visualization.

fun enableTerrain(exaggerationFactor: Double? = null)

Enables the 3D terrain visualization.

Gets the current projection type if set.

Returns variants for the current reference style if they exist.

Returns variants for the provided reference style if they exist.

suspend fun isSourceLoaded(sourceId: String): Boolean

Returns boolean value indicating whether the source with provided id is loaded.

fun removeLayer(layer: MTLayer)

Removes a layer from the map.

open override fun removeMarker(marker: MTMarker)

Removes the marker from the map.

fun removeSource(source: MTSource)

Removes a source from the map.

open override fun removeTextPopup(popup: MTTextPopup)

Removes a text popup from the map.