ol.style.Text

new Text

Stability: experimental
Parameters:
Name Type Argument Description
options olx.style.TextOptions <optional>

Options.

Properties
Name Type Description
font string | undefined

Font.

offsetX number | undefined

Horizontal text offset in pixels. A positive will shift the text right. Default is 0.

offsetY number | undefined

Vertical text offset in pixels. A positive will shift the text down. Default is 0.

scale number | undefined

Scale.

rotation number | undefined

Rotation.

text string | undefined

Text.

textAlign string | undefined

Text alignment.

textBaseline string | undefined

Text base line.

fill ol.style.Fill | undefined

Fill style.

stroke ol.style.Stroke | undefined

Stroke style.

Source:
  • textstyle.js, line 10

Methods

getFill

Stability: experimental
Source:
  • textstyle.js, line 105
Returns:

Fill style.

Type
ol.style.Fill

getFont

Stability: experimental
Source:
  • textstyle.js, line 80
Returns:

Font.

Type
string | undefined

getRotation

Stability: experimental
Source:
  • textstyle.js, line 114
Returns:

Rotation.

Type
number | undefined

getScale

Stability: experimental
Source:
  • textstyle.js, line 123
Returns:

Scale.

Type
number | undefined

getStroke

Stability: experimental
Source:
  • textstyle.js, line 132
Returns:

Stroke style.

Type
ol.style.Stroke

getText

Stability: experimental
Source:
  • textstyle.js, line 141
Returns:

Text.

Type
string | undefined

getTextAlign

Stability: experimental
Source:
  • textstyle.js, line 150
Returns:

Text align.

Type
string | undefined

getTextBaseline

Stability: experimental
Source:
  • textstyle.js, line 159
Returns:

Text baseline.

Type
string | undefined