RasterLayer

fun RasterLayer(id: String, source: Source, minZoom: Float = 0.0f, maxZoom: Float = 24.0f, visible: Boolean = true, opacity: Expression<FloatValue> = const(1f), hueRotate: Expression<FloatValue> = const(0f), brightnessMin: Expression<FloatValue> = const(0f), brightnessMax: Expression<FloatValue> = const(1f), saturation: Expression<FloatValue> = const(0f), contrast: Expression<FloatValue> = const(0f), resampling: Expression<RasterResampling> = const(RasterResampling.Linear), fadeDuration: Expression<MillisecondsValue> = const(300.milliseconds))(source)

Raster map textures such as satellite imagery.

Parameters

id

Unique layer name.

source

Raster data source for this layer.

minZoom

The minimum zoom level for the layer. At zoom levels less than this, the layer will be hidden. A value in the range of [0..24].

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than this, the layer will be hidden. A value in the range of [0..24].

visible

Whether the layer should be displayed.

opacity

The opacity at which the texture will be drawn. A value in range [0..1].

hueRotate

Rotates hues around the color wheel. Unit in degrees, i.e. a value in range [0..360).

brightnessMin

Increase or reduce the brightness of the image. The value is the minimum brightness. A value in range [0..1].

brightnessMax

Increase or reduce the brightness of the image. The value is the maximum brightness. A value in range [0..1].

saturation

Increase or reduce the saturation of the image. A value in range [-1..1].

contrast

Increase or reduce the contrast of the image. A value in range [-1..1].

resampling

The resampling/interpolation method to use for overscaling, also known as texture magnification filter.

fadeDuration

Fade duration in milliseconds when a new tile is added, or when a video is started or its coordinates are updated. A value in range [0..infinity).