RasterLayer

fun RasterLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("raster") }, rasterArrayBand: StringValue = StringValue.INITIAL, rasterBrightnessMax: DoubleValue = DoubleValue.INITIAL, rasterBrightnessMaxTransition: Transition = Transition.INITIAL, rasterBrightnessMin: DoubleValue = DoubleValue.INITIAL, rasterBrightnessMinTransition: Transition = Transition.INITIAL, rasterColor: ColorValue = ColorValue.INITIAL, rasterColorMix: DoubleListValue = DoubleListValue.INITIAL, rasterColorMixTransition: Transition = Transition.INITIAL, rasterColorRange: DoubleRangeValue = DoubleRangeValue.INITIAL, rasterColorRangeTransition: Transition = Transition.INITIAL, rasterContrast: DoubleValue = DoubleValue.INITIAL, rasterContrastTransition: Transition = Transition.INITIAL, rasterElevation: DoubleValue = DoubleValue.INITIAL, rasterElevationTransition: Transition = Transition.INITIAL, rasterEmissiveStrength: DoubleValue = DoubleValue.INITIAL, rasterEmissiveStrengthTransition: Transition = Transition.INITIAL, rasterFadeDuration: DoubleValue = DoubleValue.INITIAL, rasterHueRotate: DoubleValue = DoubleValue.INITIAL, rasterHueRotateTransition: Transition = Transition.INITIAL, rasterOpacity: DoubleValue = DoubleValue.INITIAL, rasterOpacityTransition: Transition = Transition.INITIAL, rasterResampling: RasterResamplingValue = RasterResamplingValue.INITIAL, rasterSaturation: DoubleValue = DoubleValue.INITIAL, rasterSaturationTransition: Transition = Transition.INITIAL, visibility: VisibilityValue = VisibilityValue.INITIAL, minZoom: LongValue = LongValue.INITIAL, maxZoom: LongValue = LongValue.INITIAL, sourceLayer: StringValue = StringValue.INITIAL, filter: Filter = Filter.INITIAL)

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. Defaults to the first band if not set.

rasterBrightnessMax

Increase or reduce the brightness of the image. The value is the maximum brightness. Default value: 1. Value range: 0, 1

rasterBrightnessMaxTransition

Defines the transition of rasterBrightnessMax. Default value: 1. Value range: 0, 1

rasterBrightnessMin

Increase or reduce the brightness of the image. The value is the minimum brightness. Default value: 0. Value range: 0, 1

rasterBrightnessMinTransition

Defines the transition of rasterBrightnessMin. Default value: 0. Value range: 0, 1

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. Default value: 0.2126,0.7152,0.0722,0.

rasterColorMixTransition

Defines the transition of rasterColorMix. Default value: 0.2126,0.7152,0.0722,0.

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. For rasterarray sources, if raster-color-range is unspecified, the source's stated data range is used.

rasterColorRangeTransition

Defines the transition of rasterColorRange.

rasterContrast

Increase or reduce the contrast of the image. Default value: 0. Value range: -1, 1

rasterContrastTransition

Defines the transition of rasterContrast. Default value: 0. Value range: -1, 1

rasterElevation

Specifies an uniform elevation from the ground, in meters. Default value: 0. Minimum value: 0.

rasterElevationTransition

Defines the transition of rasterElevation. Default value: 0. Minimum value: 0.

rasterEmissiveStrength

Controls the intensity of light emitted on the source features. Default value: 0. Minimum value: 0.

rasterEmissiveStrengthTransition

Defines the transition of rasterEmissiveStrength. Default value: 0. Minimum value: 0.

rasterFadeDuration

Fade duration when a new tile is added. Default value: 300. Minimum value: 0.

rasterHueRotate

Rotates hues around the color wheel. Default value: 0.

rasterHueRotateTransition

Defines the transition of rasterHueRotate. Default value: 0.

rasterOpacity

The opacity at which the image will be drawn. Default value: 1. Value range: 0, 1

rasterOpacityTransition

Defines the transition of rasterOpacity. Default value: 1. Value range: 0, 1

rasterResampling

The resampling/interpolation method to use for overscaling, also known as texture magnification filter Default value: "linear".

rasterSaturation

Increase or reduce the saturation of the image. Default value: 0. Value range: -1, 1

rasterSaturationTransition

Defines the transition of rasterSaturation. Default value: 0. Value range: -1, 1

visibility

Whether this layer is displayed. Default value: "visible".

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden. Value range: 0, 24

maxZoom

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

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.