BackgroundStyleLayer class final

The background color or pattern of the map.

https://maplibre.org/maplibre-style-spec/layers/#background

Inheritance

Constructors

BackgroundStyleLayer({required String id, double minZoom = 0, double maxZoom = 24, bool visible = true, Expression<Color>? color, StyleTransition? colorTransition, Expression<String>? pattern, StyleTransition? patternTransition, Expression<num>? opacity, StyleTransition? opacityTransition})
Creates a BackgroundStyleLayer that is not on a map yet.
BackgroundStyleLayer.fromJson(Map<String, Object?> json)
Reads a BackgroundStyleLayer from the JSON of a style layer.

Properties

color ↔ Expression<Color>
The color with which the background will be drawn.
getter/setter pair
colorTransition ↔ StyleTransition?
How color changes to a new value.
getter/setter pair
filter ↔ Expression<bool>?
The condition on source features. Only features that match it are shown. Zoom expressions in filters are only evaluated at integer zoom levels, and the feature-state expression is not supported in them.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
The unique name of the layer.
finalinherited
maxZoom ↔ double
The maximum zoom level of the layer. At and above it, the layer is hidden.
getter/setter pairinherited
minZoom ↔ double
The minimum zoom level of the layer. Below it, the layer is hidden.
getter/setter pairinherited
onClick ↔ StyleLayerFeatureCallback?
Called when the user taps or clicks a feature of this layer, with the topmost feature under the pointer.
getter/setter pairinherited
onEnter ↔ StyleLayerFeatureCallback?
Called when a mouse or stylus moves onto a feature of this layer.
getter/setter pairinherited
onLeave ↔ StyleLayerFeatureCallback?
Called when the mouse or stylus leaves the feature that onEnter reported, including when it leaves the map.
getter/setter pairinherited
opacity ↔ Expression<num>
The opacity at which the background will be drawn.
getter/setter pair
opacityTransition ↔ StyleTransition?
How opacity changes to a new value.
getter/setter pair
pattern ↔ Expression<String>?
Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
getter/setter pair
patternTransition ↔ StyleTransition?
How pattern changes to a new value.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The type of the layer in the style spec, such as line.
no setteroverride
visible ↔ bool
Whether the layer is shown.
getter/setter pairinherited

Methods

moveBelow(String? layerId) → void
Moves this layer below the layer layerId, or to the top if it is null. See StyleLayers.move.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
The layer as the JSON of a style layer.
inherited
toString() → String
A string representation of this object.
inherited
updateFrom(StyleLayer other) → void
Sets every property of this layer that differs from other and leaves the rest alone. Only the changes reach the map.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited