-
Name Type Description optionsOptions
Name Type Description fontSizenumber Text size, in pixels. Default
13.offsetArray.<number> Simpel Label offset, units in
ems. Defaults to[0, 0].anchorstring Anchor. Possible values:
center,left,right,top,bottom,top-left,top-right,bottom-left,bottom-right. Defaultstopjustifystring Justify: Possible values:
auto,left,center,right. Defaultscentertextstring Simple Label text (with no background).
visibleboolean Visible. Show or hide text.
textColorstring Text color. Default
#000000.textOpacitynumber Text opacity. Default
1.strokeColorstring Stroke color. Default
#ffffff.strokeWidthnumber Stroke width. Default
2.textRotationnumber 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 ignoreVisibilityboolean (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 fontSizenumber Font size in pixels.
-
Change displacement on the horizontal axis. If have an assigned marker updates it
Name Type Description offsetArray.<number> Offset
[x,y]. -
Change the text passed by parameter. If have an assigned marker updates it
Name Type Description textstring Text to put to simple label.
-
Change simple label opacity. If have an assigned marker updates it
Name Type Description textOpacitynumber Text opacity
-
Show or hide simple label text
Name Type Description visibleboolean Visible