BackgroundLayer

The background color or pattern of the map.

See also

Parameters

layerId

the ID of the layer

Constructors

Link copied to clipboard
fun BackgroundLayer(layerId: String)

Types

Link copied to clipboard
object Companion

Static variables and methods.

Functions

Link copied to clipboard
open override fun backgroundColor(backgroundColor: Expression): BackgroundLayer
open override fun backgroundColor(@ColorInt backgroundColor: Int): BackgroundLayer
open override fun backgroundColor(backgroundColor: String): BackgroundLayer

The color with which the background will be drawn.

Link copied to clipboard

Set the BackgroundColor property transition options

Link copied to clipboard
open override fun backgroundEmissiveStrength(backgroundEmissiveStrength: Expression): BackgroundLayer
open override fun backgroundEmissiveStrength(backgroundEmissiveStrength: Double): BackgroundLayer

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Set the BackgroundEmissiveStrength property transition options

Link copied to clipboard
open override fun backgroundOpacity(backgroundOpacity: Expression): BackgroundLayer
open override fun backgroundOpacity(backgroundOpacity: Double): BackgroundLayer

The opacity at which the background will be drawn.

Link copied to clipboard

Set the BackgroundOpacity property transition options

Link copied to clipboard
open override fun backgroundPattern(backgroundPattern: Expression): BackgroundLayer
open override fun backgroundPattern(backgroundPattern: String): BackgroundLayer

Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

Link copied to clipboard
fun bindTo(delegate: MapboxStyleManager)

Bind the layer to the Style.

open override fun bindTo(delegate: MapboxStyleManager, position: LayerPosition?)

Bind the layer to the map controller.

Link copied to clipboard
open override fun maxZoom(maxZoom: Double): BackgroundLayer

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

Link copied to clipboard
open override fun minZoom(minZoom: Double): BackgroundLayer

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

Link copied to clipboard
open override fun slot(slot: String): BackgroundLayer

The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.

Link copied to clipboard
open override fun visibility(visibility: Expression): BackgroundLayer
open override fun visibility(visibility: Visibility): BackgroundLayer

Whether this layer is displayed.

Properties

Link copied to clipboard

The color with which the background will be drawn.

Link copied to clipboard

The color with which the background will be drawn.

Link copied to clipboard

The color with which the background will be drawn.

Link copied to clipboard

Transition options for BackgroundColor.

Link copied to clipboard

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Transition options for BackgroundEmissiveStrength.

Link copied to clipboard

The opacity at which the background will be drawn.

Link copied to clipboard

The opacity at which the background will be drawn.

Link copied to clipboard

Transition options for BackgroundOpacity.

Link copied to clipboard

Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

Link copied to clipboard

Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

Link copied to clipboard
open override val layerId: String
Link copied to clipboard
open override val maxZoom: Double?

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

Link copied to clipboard
open override val minZoom: Double?

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

Link copied to clipboard
open override val slot: String?

The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.

Link copied to clipboard
open override val visibility: Visibility?

Whether this layer is displayed.

Link copied to clipboard

Whether this layer is displayed.

Extensions

Link copied to clipboard

Get the persistent property as Boolean.