new ol.style.Text(opt_options) experimental
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
Methods
-
getFill(){ol.style.Fill} experimental
src/ol/style/text.js, line 133 -
Get the fill style for the text.
Returns:
Fill style.
-
getFont(){string|undefined} experimental
src/ol/style/text.js, line 103 -
Get the font name.
Returns:
Font.
-
getOffsetX(){number} experimental
src/ol/style/text.js, line 113 -
Get the x-offset for the text.
Returns:
Horizontal text offset.
-
getOffsetY(){number} experimental
src/ol/style/text.js, line 123 -
Get the y-offset for the text.
Returns:
Vertical text offset.
-
getRotateWithView(){boolean|undefined} experimental
src/ol/style/text.js, line 143 -
Determine whether the text rotates with the map.
Returns:
Rotate with map.
-
getRotation(){number|undefined} experimental
src/ol/style/text.js, line 153 -
Get the text rotation.
Returns:
Rotation.
-
getScale(){number|undefined} experimental
src/ol/style/text.js, line 163 -
Get the text scale.
Returns:
Scale.
-
getStroke(){ol.style.Stroke} experimental
src/ol/style/text.js, line 173 -
Get the stroke style for the text.
Returns:
Stroke style.
-
getText(){string|undefined} experimental
src/ol/style/text.js, line 183 -
Get the text to be rendered.
Returns:
Text.
-
getTextAlign(){string|undefined} experimental
src/ol/style/text.js, line 193 -
Get the text alignment.
Returns:
Text align.
-
getTextBaseline(){string|undefined} experimental
src/ol/style/text.js, line 203 -
Get the text baseline.
Returns:
Text baseline.
-
setFill(fill) experimental
src/ol/style/text.js, line 247 -
Set the fill.
Name Type Description fill
ol.style.Fill Fill style.
-
setFont(font) experimental
src/ol/style/text.js, line 214 -
Set the font.
Name Type Description font
string | undefined Font.
-
setOffsetX(offsetX) experimental
src/ol/style/text.js, line 225 -
Set the x offset.
Name Type Description offsetX
number Horizontal text offset.
-
setOffsetY(offsetY) experimental
src/ol/style/text.js, line 236 -
Set the y offset.
Name Type Description offsetY
number Vertical text offset.
-
setRotation(rotation) experimental
src/ol/style/text.js, line 258 -
Set the rotation.
Name Type Description rotation
number | undefined Rotation.
-
setScale(scale) experimental
src/ol/style/text.js, line 269 -
Set the scale.
Name Type Description scale
number | undefined Scale.
-
setStroke(stroke) experimental
src/ol/style/text.js, line 280 -
Set the stroke.
Name Type Description stroke
ol.style.Stroke Stroke style.
-
setText(text) experimental
src/ol/style/text.js, line 291 -
Set the text.
Name Type Description text
string | undefined Text.
-
setTextAlign(textAlign) experimental
src/ol/style/text.js, line 302 -
Set the text alignment.
Name Type Description textAlign
string | undefined Text align.
-
setTextBaseline(textBaseline) experimental
src/ol/style/text.js, line 313 -
Set the text baseline.
Name Type Description textBaseline
string | undefined Text baseline.