-
Name Type Description options
Options
Name Type Description fontSize
number Text size, in pixels. Default
13
.offset
Array.<number> Simpel Label offset, units in
ems
. Defaults to[0, 0]
.anchor
string Anchor. Possible values:
center
,left
,right
,top
,bottom
,top-left
,top-right
,bottom-left
,bottom-right
. Defaultstop
justify
string Justify: Possible values:
auto
,left
,center
,right
. Defaultscenter
text
string Simple Label text (with no background).
visible
boolean Visible. Show or hide text.
textColor
string Text color. Default
#000000
.textOpacity
string Text opacity. Default
1
.strokeColor
string Stroke color. Default
#ffffff
.strokeWidth
number Stroke width. Default
2
.textRotation
number Text rotation. Default
0
.
Methods
-
Get simple label anchor
Returns:
Anchor
-
Returns text font
Returns:
Font size in pixels.
-
Get simple label justify
Returns:
Justify
-
Returns offset.
Returns:
Offset[x,y]
.
-
Get simple label stroke color
Returns:
strokeColor
-
Get simple label stroke width
Returns:
strokeWidth
-
Get simple label text
Name Type Description ignoreVisibility
boolean (defaults to false) Ignore visibility
Returns:
Text.
-
Get simple label color
Returns:
Color
-
Get simple label text opacity
Returns:
Text opacity
-
Get simple label text rotation
Returns:
Text rotation
-
Return if simple label is visible
-
Change the text size in pixels. If have an assigned marker updates it
Name Type Description fontSize
number Font size in pixels.
-
Change displacement on the horizontal axis. If have an assigned marker updates it
Name Type Description offset
Array.<number> Offset
[x,y]
. -
Change the text passed by parameter. If have an assigned marker updates it
Name Type Description text
string Text to put to simple label.
-
Change simple label opacity. If have an assigned marker updates it
Name Type Description textOpacity
number Text opacity
-
Show or hide simple label text
Name Type Description visible
boolean Visible