MTRasterLayer

@Serializable
class MTRasterLayer : MTLayer

The raster style layer that renders raster map textures such as satellite imagery.

Supports paint properties like brightness, contrast, fade duration, hue rotation, opacity, resampling and saturation, and a layout visibility flag.

Constructors

constructor(identifier: String, sourceIdentifier: String)
constructor(identifier: String, sourceIdentifier: String, maxZoom: Double, minZoom: Double, sourceLayer: String)
constructor(identifier: String, type: MTLayerType, sourceIdentifier: String, maxZoom: Double?, minZoom: Double?, sourceLayer: String?, brightnessMax: Double?, brightnessMin: Double?, contrast: Double?, fadeDuration: Double?, hueRotate: Double?, opacity: Double?, resampling: MTRasterResampling?, saturation: Double?, visibility: MTLayerVisibility)

Properties

Increase or reduce the brightness of the image. The value is the maximum brightness. Optional number between 0 and 1 inclusive. Defaults to 1.

Increase or reduce the brightness of the image. The value is the minimum brightness. Optional number between 0 and 1 inclusive. Defaults to 0.

Increase or reduce the contrast of the image. Optional number between -1 and 1 inclusive. Defaults to 0.

Fade duration when a new tile is added. Optional number greater than or equal to 0. Units in milliseconds. Defaults to 300.

Rotates hues around the color wheel. Units in degrees. Defaults to 0.

@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. Optional number between 0 and 24. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

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

The minimum zoom level for the layer. Optional number between 0 and 24. At zoom levels less than the minzoom, the layer will be hidden.

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

The resampling/interpolation method to use for overscaling. Defaults to LINEAR.

Increase or reduce the saturation of the image. Optional number between -1 and 1 inclusive. Defaults to 0.

@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. Not used for raster sources.

open override var type: MTLayerType

Type of the layer.

Enum controlling whether this layer is displayed.