Mapbox spec: background
import { BackgroundLayer } from '@rnmapbox/maps';
BackgroundLayer
string
required A string that uniquely identifies the layer in the style to which it is added.
boolean
The id refers to en existing layer in the style. Does not create a new layer.
string
The 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
string
Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
string
Inserts a layer above aboveLayerID.
string
Inserts a layer below belowLayerID
number
Inserts a layer at a specified index
FilterExpression
Filter only the features in the source layer that satisfy a condition that you define
number
The minimum zoom level at which the layer gets parsed and appears.
number
The maximum zoom level at which the layer gets parsed and appears.
BackgroundLayerStyleProps
Customizable 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}