RasterLayer class final
Raster map textures such as satellite imagery.
Constructors
-
RasterLayer({required String id, Visibility? visibility, List<
Object> ? visibilityExpression, List<Object> ? filter, double? minZoom, double? maxZoom, String? slot, required String sourceId, String? sourceLayer, String? rasterArrayBand, List<Object> ? rasterArrayBandExpression, double? rasterBrightnessMax, List<Object> ? rasterBrightnessMaxExpression, double? rasterBrightnessMin, List<Object> ? rasterBrightnessMinExpression, int? rasterColor, List<Object> ? rasterColorExpression, List<double?> ? rasterColorMix, List<Object> ? rasterColorMixExpression, List<double?> ? rasterColorRange, List<Object> ? rasterColorRangeExpression, double? rasterContrast, List<Object> ? rasterContrastExpression, double? rasterElevation, List<Object> ? rasterElevationExpression, double? rasterEmissiveStrength, List<Object> ? rasterEmissiveStrengthExpression, double? rasterFadeDuration, List<Object> ? rasterFadeDurationExpression, double? rasterHueRotate, List<Object> ? rasterHueRotateExpression, double? rasterOpacity, List<Object> ? rasterOpacityExpression, RasterResampling? rasterResampling, List<Object> ? rasterResamplingExpression, double? rasterSaturation, List<Object> ? rasterSaturationExpression})
Properties
-
filter
↔ List<
Object> ? -
Expression specifying conditions on source features.
Only features that match the filter are displayed.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
The ID of the Layer.
getter/setter pairinherited
- maxZoom ↔ double?
-
Maximum zoom level. At zoom levels equal to or greater than this, the
layer is hidden. Range: 0 to 24.
getter/setter pairinherited
- minZoom ↔ double?
-
Minimum zoom level. At zoom levels less than this, the layer is hidden.
Range: 0 to 24.
getter/setter pairinherited
- rasterArrayBand ↔ String?
-
Displayed band of raster array source layer. Defaults to the first band if not set.
getter/setter pair
-
rasterArrayBandExpression
↔ List<
Object> ? -
Displayed band of raster array source layer. Defaults to the first band if not set.
getter/setter pair
- rasterBrightnessMax ↔ double?
-
Increase or reduce the brightness of the image. The value is the maximum brightness.
Default value: 1. Value range:
0, 1getter/setter pair -
rasterBrightnessMaxExpression
↔ List<
Object> ? -
Increase or reduce the brightness of the image. The value is the maximum brightness.
Default value: 1. Value range:
0, 1getter/setter pair - rasterBrightnessMin ↔ double?
-
Increase or reduce the brightness of the image. The value is the minimum brightness.
Default value: 0. Value range:
0, 1getter/setter pair -
rasterBrightnessMinExpression
↔ List<
Object> ? -
Increase or reduce the brightness of the image. The value is the minimum brightness.
Default value: 0. Value range:
0, 1getter/setter pair - rasterColor ↔ int?
-
Defines the color ramp used to colorize a raster layer, parameterized by the
["raster-value"]expression and evaluated over the range specified byraster-color-range. Raster values are spaced evenly across the range by default.getter/setter pair -
rasterColorExpression
↔ List<
Object> ? -
Defines the color ramp used to colorize a raster layer, parameterized by the
["raster-value"]expression and evaluated over the range specified byraster-color-range. Raster values are spaced evenly across the range by default.getter/setter pair -
rasterColorMix
↔ List<
double?> ? -
When
raster-coloris active, specifies how the raster value is computed from a non-rasterarraysource's channels, using the equationmix.r - src.r + mix.g - src.g + mix.b - src.b + mix.a. The first three components weight the source's red, green, and blue channels; the fourth is a constant offset and is not multiplied by source alpha. Source alpha is carried through and applied as opacity to the colorized result. The default corresponds to RGB luminosity.rasterarraysources ignore this property, as their raster value is decoded directly from the source data. Default value:0.2126,0.7152,0.0722,0.getter/setter pair -
rasterColorMixExpression
↔ List<
Object> ? -
When
raster-coloris active, specifies how the raster value is computed from a non-rasterarraysource's channels, using the equationmix.r - src.r + mix.g - src.g + mix.b - src.b + mix.a. The first three components weight the source's red, green, and blue channels; the fourth is a constant offset and is not multiplied by source alpha. Source alpha is carried through and applied as opacity to the colorized result. The default corresponds to RGB luminosity.rasterarraysources ignore this property, as their raster value is decoded directly from the source data. Default value:0.2126,0.7152,0.0722,0.getter/setter pair -
rasterColorRange
↔ List<
double?> ? -
When
raster-coloris active, specifies the range of raster values mapped onto the color ramp, from the start of the ramp (low bound) to its end (high bound). Forrasterarraysources the raster value is the decoded source data in the source's own units, and the source's stated data range is used when this property is unspecified. For other raster sources the raster value is computed from the source's channels viaraster-color-mix. Defaults to[0, 1]when no range is otherwise available.getter/setter pair -
rasterColorRangeExpression
↔ List<
Object> ? -
When
raster-coloris active, specifies the range of raster values mapped onto the color ramp, from the start of the ramp (low bound) to its end (high bound). Forrasterarraysources the raster value is the decoded source data in the source's own units, and the source's stated data range is used when this property is unspecified. For other raster sources the raster value is computed from the source's channels viaraster-color-mix. Defaults to[0, 1]when no range is otherwise available.getter/setter pair - rasterContrast ↔ double?
-
Increase or reduce the contrast of the image.
Default value: 0. Value range:
-1, 1getter/setter pair -
rasterContrastExpression
↔ List<
Object> ? -
Increase or reduce the contrast of the image.
Default value: 0. Value range:
-1, 1getter/setter pair - rasterElevation ↔ double?
-
Defines an uniform elevation from the base specified in raster-elevation-reference, in meters.
Default value: 0. Minimum value: 0.
getter/setter pair
-
rasterElevationExpression
↔ List<
Object> ? -
Defines an uniform elevation from the base specified in raster-elevation-reference, in meters.
Default value: 0. Minimum value: 0.
getter/setter pair
- rasterEmissiveStrength ↔ double?
-
Controls the intensity of light emitted on the source features.
Default value: 0. Minimum value: 0. The unit of rasterEmissiveStrength is in intensity.
getter/setter pair
-
rasterEmissiveStrengthExpression
↔ List<
Object> ? -
Controls the intensity of light emitted on the source features.
Default value: 0. Minimum value: 0. The unit of rasterEmissiveStrength is in intensity.
getter/setter pair
- rasterFadeDuration ↔ double?
-
Fade duration when a new tile is added.
Default value: 300. Minimum value: 0. The unit of rasterFadeDuration is in milliseconds.
getter/setter pair
-
rasterFadeDurationExpression
↔ List<
Object> ? -
Fade duration when a new tile is added.
Default value: 300. Minimum value: 0. The unit of rasterFadeDuration is in milliseconds.
getter/setter pair
- rasterHueRotate ↔ double?
-
Rotates hues around the color wheel.
Default value: 0. The unit of rasterHueRotate is in degrees.
getter/setter pair
-
rasterHueRotateExpression
↔ List<
Object> ? -
Rotates hues around the color wheel.
Default value: 0. The unit of rasterHueRotate is in degrees.
getter/setter pair
- rasterOpacity ↔ double?
-
The opacity at which the image will be drawn.
Default value: 1. Value range:
0, 1getter/setter pair -
rasterOpacityExpression
↔ List<
Object> ? -
The opacity at which the image will be drawn.
Default value: 1. Value range:
0, 1getter/setter pair - rasterResampling ↔ RasterResampling?
-
The resampling/interpolation method to use for overscaling, also known as texture magnification filter
Default value: "linear".
getter/setter pair
-
rasterResamplingExpression
↔ List<
Object> ? -
The resampling/interpolation method to use for overscaling, also known as texture magnification filter
Default value: "linear".
getter/setter pair
- rasterSaturation ↔ double?
-
Increase or reduce the saturation of the image.
Default value: 0. Value range:
-1, 1getter/setter pair -
rasterSaturationExpression
↔ List<
Object> ? -
Increase or reduce the saturation of the image.
Default value: 0. Value range:
-1, 1getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slot ↔ String?
-
The slot this layer is assigned to. If specified and a slot with that
name exists, the layer is placed at that slot's position in the layer order.
getter/setter pairinherited
- sourceId ↔ String
-
The id of the source.
getter/setter pair
- sourceLayer ↔ String?
-
A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.
getter/setter pair
- visibility ↔ Visibility?
-
The visibility of the layer.
getter/setter pairinherited
-
visibilityExpression
↔ List<
Object> ? -
The visibility of the layer, expressed as a style expression.
getter/setter pairinherited
Methods
-
getType(
) → String -
Returns the layer's type as a String (e.g. "fill", "line").
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decode(
String properties) → RasterLayer