-
Name Type Description optionsIcon options
Name Type Description srcstring | undefined Source URL
anchorstring Anchor
'center' , 'top' , 'bottom' , 'left' , 'right' , 'top-left' , 'top-right' , 'bottom-left' , and 'bottom-right'. Defaultbottom.offsetArray.<number> | undefined Offset
popupAnchorstring | undefined Anchor
'center' , 'top' , 'bottom' , 'left' , 'right' , 'top-left' , 'top-right' , 'bottom-left' , and 'bottom-right'. Defaultbottom.popupOffsetArray.<number> | undefined Popup offset
rotationnumber Rotation
scalenumber Size multiplier. Default
1.sizeArray.<number> Only for SVG icons. Format value
[width, height]. For example:[32, 32]. If not specified, it will use size fromviewBoxattribute fromsvgstring SVG in string format, only those with
pathtag.opacitynumber Opacity
loadedIconImagestring Icon image already loaded on maplibre.
Methods
-
Get anchor icon
Returns:
Anchor
-
Get filename. In SVG case it returns an unique hash (for internal purposes)
Returns:
Filename
-
Get height
Returns:
Height
-
Get icon offset.
Returns:
Offset
-
Obtaint opacity
Returns:
Opacity
-
Obtaoin popup anchor
Returns:
PopupAnchor
-
Obtain popup offset
Returns:
Offset
-
Obtaint rotation in degrees
Returns:
Rotation in degrees
-
Obtaint size multiplier
Returns:
Size multiplier
-
Get source url.
Returns:
Source URL
-
Get SVG in string format.
-
Get width
Returns:
Width
-
Name Type Description offsetArray.<number> Offset
-
Set opacity.
Name Type Description opacitynumber Opacity.
-
Set rotation in degrees.
Name Type Description rotationnumber Rotation in degrees.
-
Set size multiplier
Name Type Description sizenumber Size multiplier
-
Name Type Description srcstring Src