SymbolLayer
Mapbox spec: symbol
import { SymbolLayer } from '@rnmapbox/maps';
SymbolLayer
SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
props
id
string
required A string that uniquely identifies the source in the style to which it is added.
existing
boolean
The id refers to an existing layer in the style. Does not create a new layer.
sourceID
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: Mapbox.StyleSource.DefaultSourceID
sourceLayerID
string
Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
aboveLayerID
string
Inserts a layer above aboveLayerID.
belowLayerID
string
Inserts a layer below belowLayerID
layerIndex
number
Inserts a layer at a specified index
filter
FilterExpression
Filter only the features in the source layer that satisfy a condition that you define
minZoomLevel
number
The minimum zoom level at which the layer gets parsed and appears.
maxZoomLevel
number
The maximum zoom level at which the layer gets parsed and appears.
slot
'bottom' | 'middle' | 'top'
The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
v11 only
style
SymbolLayerStyleProps
required Customizable style attributes
children
JSX.Element | JSX.Element[]
@deprecated passed children used to create an image with id of symbol in style and also set the iconImageName property accordingly. This is now deprecated, use Image component instead.
styles
-
symbolPlacement
-
symbolSpacing
-
symbolAvoidEdges
-
symbolSortKey
-
symbolZOrder
-
iconAllowOverlap
-
iconIgnorePlacement
-
iconOptional
-
iconRotationAlignment
-
iconSize
-
iconTextFit
-
iconTextFitPadding
-
iconImage
-
iconRotate
-
iconPadding
-
iconKeepUpright
-
iconOffset
-
iconAnchor
-
iconPitchAlignment
-
textPitchAlignment
-
textRotationAlignment
-
textField
-
textFont
-
textSize
-
textMaxWidth
-
textLineHeight
-
textLetterSpacing
-
textJustify
-
textRadialOffset
-
textVariableAnchor
-
textAnchor
-
textMaxAngle
-
textWritingMode
-
textRotate
-
textPadding
-
textKeepUpright
-
textTransform
-
textOffset
-
textAllowOverlap
-
textIgnorePlacement
-
textOptional
-
visibility
-
iconOpacity
-
iconColor
-
iconHaloColor
-
iconHaloWidth
-
iconHaloBlur
-
iconTranslate
-
iconTranslateAnchor
-
textOpacity
-
textColor
-
textHaloColor
-
textHaloWidth
-
textHaloBlur
-
textTranslate
-
textTranslateAnchor
symbolPlacement
Name: symbolPlacement
Mapbox spec: symbol-placement
Description
Label placement relative to its geometry.
Type
enum
Default Value
point
Supported Values
point - The label is placed at the point where the geometry is located.
line - The label is placed along the line of the geometry. Can only be used on LineString
and Polygon
geometries.
line-center - The label is placed at the center of the line of the geometry. Can only be used on LineString
and Polygon
geometries. Note that a single feature in a vector tile may contain multiple line geometries.