MTBackgroundLayer

@Serializable
class MTBackgroundLayer : MTLayer

The background style layer covers the entire map. Use it to configure a color or pattern rendered beneath all other map content. If the background layer is transparent or omitted, any area not covered by another layer is transparent.

Constructors

constructor(identifier: String)
constructor(identifier: String, type: MTLayerType, maxZoom: Double?, minZoom: Double?, color: Int?, opacity: Double?, pattern: String?, visibility: MTLayerVisibility)

Properties

@Serializable(with = ColorAsHexSerializer::class)
var color: Int?

The color with which the background will be drawn. Defaults to black. Disabled by pattern.

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

Unique layer identifier.

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

Max zoom of the layer.

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

Min zoom of the layer.

The opacity at which the background will be drawn. Optional number between 0 and 1 inclusive. Defaults to 1.

Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a power of two.

@Transient
open override var sourceIdentifier: String

Background layers do not have a source. Kept only to satisfy MTLayer contract and excluded from serialization.

@Transient
open override var sourceLayer: String?

Source layer is not applicable for background layers. Excluded from serialization.

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

Type of the layer. Always MTLayerType.BACKGROUND.

Whether this layer is displayed.