RasterLayer

fun RasterLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("raster") }, rasterArrayBand: RasterArrayBand = RasterArrayBand.default, rasterBrightnessMax: RasterBrightnessMax = RasterBrightnessMax.default, rasterBrightnessMaxTransition: Transition = Transition.default, rasterBrightnessMin: RasterBrightnessMin = RasterBrightnessMin.default, rasterBrightnessMinTransition: Transition = Transition.default, rasterColor: RasterColor = RasterColor.default, rasterColorMix: RasterColorMix = RasterColorMix.default, rasterColorMixTransition: Transition = Transition.default, rasterColorRange: RasterColorRange = RasterColorRange.default, rasterColorRangeTransition: Transition = Transition.default, rasterContrast: RasterContrast = RasterContrast.default, rasterContrastTransition: Transition = Transition.default, rasterElevation: RasterElevation = RasterElevation.default, rasterElevationTransition: Transition = Transition.default, rasterEmissiveStrength: RasterEmissiveStrength = RasterEmissiveStrength.default, rasterEmissiveStrengthTransition: Transition = Transition.default, rasterFadeDuration: RasterFadeDuration = RasterFadeDuration.default, rasterHueRotate: RasterHueRotate = RasterHueRotate.default, rasterHueRotateTransition: Transition = Transition.default, rasterOpacity: RasterOpacity = RasterOpacity.default, rasterOpacityTransition: Transition = Transition.default, rasterResampling: RasterResampling = RasterResampling.default, rasterSaturation: RasterSaturation = RasterSaturation.default, rasterSaturationTransition: Transition = Transition.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

Raster map textures such as satellite imagery.

See also

Parameters

sourceState

the source that drives this layer.

layerId

the ID of the layer, by default, a random id will be generated with UUID.

rasterArrayBand

Displayed band of raster array source layer

rasterBrightnessMax

Increase or reduce the brightness of the image. The value is the maximum brightness.

rasterBrightnessMin

Increase or reduce the brightness of the image. The value is the minimum brightness.

rasterColor

Defines a color map by which to colorize a raster layer, parameterized by the ["raster-value"] expression and evaluated at 256 uniformly spaced steps over the range specified by raster-color-range.

rasterColorMix

When raster-color is active, specifies the combination of source RGB channels used to compute the raster value. Computed using the equation mix.r * src.r + mix.g * src.g + mix.b * src.b + mix.a. The first three components specify the mix of source red, green, and blue channels, respectively. The fourth component serves as a constant offset and is not multipled by source alpha. Source alpha is instead carried through and applied as opacity to the colorized result. Default value corresponds to RGB luminosity.

rasterColorRange

When raster-color is active, specifies the range over which raster-color is tabulated. Units correspond to the computed raster value via raster-color-mix.

rasterContrast

Increase or reduce the contrast of the image.

rasterElevation

Specifies an uniform elevation from the ground, in meters. Only supported with image sources.

rasterEmissiveStrength

Controls the intensity of light emitted on the source features.

rasterFadeDuration

Fade duration when a new tile is added.

rasterHueRotate

Rotates hues around the color wheel.

rasterOpacity

The opacity at which the image will be drawn.

rasterResampling

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

rasterSaturation

Increase or reduce the saturation of the image.

visibility

Whether this layer is displayed.

minZoom

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

maxZoom

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

sourceLayer

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

filter

An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The ["feature-state", ...] expression is not supported in filter expressions. The ["pitch"] and ["distance-from-center"] expressions are supported only for filter expressions on the symbol layer.