RasterParticleLayer

fun RasterParticleLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("raster-particle") }, rasterParticleArrayBand: RasterParticleArrayBand = RasterParticleArrayBand.default, rasterParticleColor: RasterParticleColor = RasterParticleColor.default, rasterParticleCount: RasterParticleCount = RasterParticleCount.default, rasterParticleFadeOpacityFactor: RasterParticleFadeOpacityFactor = RasterParticleFadeOpacityFactor.default, rasterParticleFadeOpacityFactorTransition: Transition = Transition.default, rasterParticleMaxSpeed: RasterParticleMaxSpeed = RasterParticleMaxSpeed.default, rasterParticleResetRateFactor: RasterParticleResetRateFactor = RasterParticleResetRateFactor.default, rasterParticleSpeedFactor: RasterParticleSpeedFactor = RasterParticleSpeedFactor.default, rasterParticleSpeedFactorTransition: Transition = Transition.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

Particle animation driven by textures such as wind maps.

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.

rasterParticleArrayBand

Displayed band of raster array source layer

rasterParticleColor

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

rasterParticleCount

Defines the amount of particles per tile.

rasterParticleFadeOpacityFactor

Defines defines the opacity coefficient applied to the faded particles in each frame. In practice, this property controls the length of the particle tail.

rasterParticleMaxSpeed

Defines the maximum speed for particles. Velocities with magnitudes equal to or exceeding this value are clamped to the max value.

rasterParticleResetRateFactor

Defines a coefficient for a time period at which particles will restart at a random position, to avoid degeneration (empty areas without particles).

rasterParticleSpeedFactor

Defines a coefficient for the speed of particles’ motion.

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.