Interface: SymbolPaint
Defined in: spec/types.ts:223
Properties
iconAllowOverlap?
optionaliconAllowOverlap?:boolean
Defined in: spec/types.ts:287
Whether an image stays drawn when it collides with another. MapLibre
hides colliding symbols by default, which is right for labels but drops
markers of neighbouring places — set true to keep every one.
Default
false
iconAnchor?
optionaliconAnchor?:"center"|"left"|"right"|"top"|"bottom"|"top-left"|"top-right"|"bottom-left"|"bottom-right"
Defined in: spec/types.ts:268
Which part of the image sits on the feature's coordinate. A pin
(PinImage) points with its bottom tip, so it takes 'bottom';
MapLibre's default, 'center', would leave it floating half its height
above the place it marks.
Default
'center'
iconColor?
optionaliconColor?:string
Defined in: spec/types.ts:229
iconImage?
optionaliconImage?:string
Defined in: spec/types.ts:257
Image drawn at each feature: the id of a ImageSpec in
spec.images, or the name of an icon in the basemap's sprite.
iconOffset?
optionaliconOffset?: [number,number]
Defined in: spec/types.ts:279
Offset of the image from its anchor, in pixels [x, y].
iconOpacity?
optionaliconOpacity?:number
Defined in: spec/types.ts:230
iconSize?
optionaliconSize?:number
Defined in: spec/types.ts:259
Scale factor applied to the image.
Default
1
textColor?
optionaltextColor?:string
Defined in: spec/types.ts:225
textField?
optionaltextField?:string|SymbolExpression
Defined in: spec/types.ts:237
The label's text. A {property} token, a literal, or a
SymbolExpression when the label has to be computed per feature
(formatting a count, picking between properties).
textFont?
optionaltextFont?:string[]
Defined in: spec/types.ts:252
Fontstack the glyphs are requested from. Defaults to
['Noto Sans Regular'], which OpenFreeMap and most OpenMapTiles-derived
basemaps serve — MapLibre's own default (Open Sans Regular,
Arial Unicode MS Regular) is served by neither, and a missing fontstack
404s the glyph request and rasterizes no text at all.
Default
['Noto Sans Regular']
textHaloColor?
optionaltextHaloColor?:string
Defined in: spec/types.ts:227
textHaloWidth?
optionaltextHaloWidth?:number
Defined in: spec/types.ts:228
textOpacity?
optionaltextOpacity?:number
Defined in: spec/types.ts:226
textSize?
optionaltextSize?:number|SymbolExpression
Defined in: spec/types.ts:242
Label size in pixels, or a SymbolExpression to drive it from a
feature property (['step', ['get', 'count'], 11, 100, 14]).