Interface: SymbolPaint
Defined in: spec/types.ts:286
Properties
iconAllowOverlap?
optionaliconAllowOverlap?:boolean
Defined in: spec/types.ts:350
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:331
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:292
iconImage?
optionaliconImage?:string
Defined in: spec/types.ts:320
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:342
Offset of the image from its anchor, in pixels [x, y].
iconOpacity?
optionaliconOpacity?:number
Defined in: spec/types.ts:293
iconSize?
optionaliconSize?:number
Defined in: spec/types.ts:322
Scale factor applied to the image.
Default
1
textColor?
optionaltextColor?:string
Defined in: spec/types.ts:288
textField?
optionaltextField?:string|SymbolExpression
Defined in: spec/types.ts:300
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:315
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:290
textHaloWidth?
optionaltextHaloWidth?:number
Defined in: spec/types.ts:291
textOpacity?
optionaltextOpacity?:number
Defined in: spec/types.ts:289
textSize?
optionaltextSize?:number|SymbolExpression
Defined in: spec/types.ts:305
Label size in pixels, or a SymbolExpression to drive it from a
feature property (['step', ['get', 'count'], 11, 100, 14]).