MTSymbolLayer

@Serializable
class MTSymbolLayer : MTLayer

The symbol style that layer renders icon and text labels at points or along lines on a map.

Constructors

constructor(identifier: String, sourceIdentifier: String)
constructor(identifier: String, sourceIdentifier: String, icon: Bitmap)
constructor(identifier: String, sourceIdentifier: String, maxZoom: Double, minZoom: Double, sourceLayer: String)
constructor(identifier: String, sourceIdentifier: String, maxZoom: Double, minZoom: Double, sourceLayer: String, icon: Bitmap, visibility: MTLayerVisibility)

Properties

@Transient
var icon: Bitmap?

Icon to use for the layer.

If true, the icon will be visible even if it collides with other symbols. Defaults to style spec default (false) when not set.

If true, the icon will be visible and will not affect placement of other symbols. Defaults to style spec default (false) when not set.

@SerialName(value = "id")
open override var identifier: String

Unique layer identifier.

@SerialName(value = "maxzoom")
open override var maxZoom: Double?

The maximum zoom level for the layer.

@SerialName(value = "minzoom")
open override var minZoom: Double?

The minimum zoom level for the layer.

@SerialName(value = "source")
open override var sourceIdentifier: String

Identifier of the source to be used for this layer.

@SerialName(value = "source-layer")
open override var sourceLayer: String?

Layer to use from a vector tile source.

If true, the text will be visible even if it collides with other symbols. Defaults to style spec default (false) when not set.

Anchor position of the text relative to the symbol anchor. For example, use MTTextAnchor.TOP with a positive Y textOffset to render text below the icon.

Text color (constant or expression), written under paint as text-color.

Label text to render for each feature, e.g. "{point_count_abbreviated}" for clusters.

Text fonts as style-spec family names.

If true, the text will be visible and will not affect placement of other symbols. Defaults to style spec default (false) when not set.

Amount to offset the text from its anchor in ems. X is right, Y is down. Example: 0.0, 1.2 with textAnchor = MTTextAnchor.TOP places text under the icon.

Label text size in pixels.

@EncodeDefault(mode = EncodeDefault.Mode.ALWAYS)
open override var type: MTLayerType

Type of the layer.

Enum controlling whether this layer is displayed.

Functions