Mapbox spec: background
import { BackgroundLayer } from '@rnmapbox/maps';
BackgroundLayerstringrequired A string that uniquely identifies the layer in the style to which it is added.
booleanThe id refers to en existing layer in the style. Does not create a new layer.
stringThe source from which to obtain the data to style. If the source has not yet been added to the current style, the behavior is undefined. Inferred from parent source only if the layer is a direct child to it.
defaults to: MapboxGL.StyleSource.DefaultSourceID
stringIdentifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
stringInserts a layer above aboveLayerID.
stringInserts a layer below belowLayerID
numberInserts a layer at a specified index
FilterExpressionFilter only the features in the source layer that satisfy a condition that you define
numberThe minimum zoom level at which the layer gets parsed and appears.
numberThe maximum zoom level at which the layer gets parsed and appears.
BackgroundLayerStylePropsCustomizable style attributes
Name: visibility
Mapbox spec: visibility
Whether this layer is displayed.
enum
visible
visible - The layer is shown.
none - The layer is not shown.
Parameters: ``
Name: backgroundColor
Mapbox spec: background-color
The color with which the background will be drawn.
color
#000000
backgroundPattern
Parameters: zoom
Name: backgroundColorTransition
The transition affecting any changes to this layer’s backgroundColor property.
{ duration, delay }
milliseconds
{duration: 300, delay: 0}
Name: backgroundPattern
Mapbox spec: background-pattern
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 zoomDependent expressions will be evaluated only at integer zoom levels.
resolvedImage
Parameters: zoom
Name: backgroundOpacity
Mapbox spec: background-opacity
The opacity at which the background will be drawn.
number
1
0
1
Parameters: zoom
Name: backgroundOpacityTransition
The transition affecting any changes to this layer’s backgroundOpacity property.
{ duration, delay }
milliseconds
{duration: 300, delay: 0}