Internal
Creates a new TextElement
.
The text to display.
The position or a list of points for a curved text, both in world space.
TextElement
text rendering parameters.
TextElement
text layout parameters.
The priority of the TextElement. Elements with the highest priority get placed first, elements with priority of
0are placed last, elements with a negative value are always rendered, ignoring priorities and allowing overrides. @param xOffset - Optional X offset of this
TextElementin screen coordinates. @param yOffset - Optional Y offset of this
TextElement` in screen coordinates.
Optional
featureId: string | numberOptional string to identify feature (originated from DataSource). Number ids are deprecated in favor of strings.
Optional
style: stringOptional
fadeNear: numberDistance to the camera (0.0 = camera position, 1.0 = farPlane) at which the label starts fading out (opacity decreases).
Optional
fadeFar: numberDistance to the camera (0.0 = camera position, 1.0 = farPlane) at which the label becomes transparent. A value of <= 0.0 disables fading.
Optional
tileOffset: numberOptional
offsetDirection: numberDirection represented as an angle in degrees clockwise from north to offset the icon in world space.
Optional
dataSourceName: stringOptional
dataSourceOrder: numberOptional
alwaysIf true
, the label will always be rendered on top. If overlapping with other labels, the
render order is undefined;
false
Optional
boundsScreen space bounds for this TextElement
.
Used by point labels in TextElementsRenderer.
Valid after loadingState
is Initialized
.
Optional
Readonly
dataOptional
Readonly
dataScaling factor of text. Defaults to 0.5, reducing the size ot 50% in the distance.
If set to true
the geometry has been already overlaid on elevation.
Optional
fadeDistance to the camera (0.0 = camera position, 1.0 = farPlane) at which the label becomes transparent. A value of <= 0.0 disables fading.
Optional
fadeDistance to the camera (0.0 = camera position, 1.0 = farPlane) at which the label starts fading out (opacity decreases).
Optional
featureOptional string to identify feature (originated from DataSource). Number ids are deprecated in favor of strings.
Optional
ignoreIgnore distance limit. Used for label in labeled-icons.
Optional
kindSpecified kind of geometry. One kind is set as default in the technique, and can be overridden in the style.
Readonly
layoutTextElement
text layout parameters.
Optional
maxDetermines maximum zoom level for visibility. Can be used to reduce the number of visible
TextElement
s based on zoom level.
Optional
mayIf true
, label is allowed to overlap other labels or icons of lower priority.
false
Optional
minDetermines minimum zoom level for visibility. Can be used to reduce the number of visible
TextElement
s based on zoom level.
Optional
Readonly
offsetDirection represented as an angle in degrees clockwise from north to offset the icon in world space.
Optional
pathReadonly
pointsThe position or a list of points for a curved text, both in world space.
The priority of the TextElement. Elements with the highest priority get placed first, elements with priority of
0are placed last, elements with a negative value are always rendered, ignoring priorities and allowing overrides. @param xOffset - Optional X offset of this
TextElementin screen coordinates. @param yOffset - Optional Y offset of this
TextElement` in screen coordinates.
If specified, determines the render order between TextElement
s. The number different
renderOrders should be as small as possible, because every specific renderOrder
may result
in one or more draw calls.
TextElements with the same integer renderOrder
will be rendered in the same batch.
The renderOrder
of TextElement
s are only relative to other TextElement
s, and not other
map elements.
A TextElement
with a higher renderOrder
will be rendered after a TextElement
with a
lower renderOrder
.
Readonly
renderTextElement
text rendering parameters.
Optional
reserveIf true
, label will reserve screen space, other markers of lower priority will not be
able to overlap.
true
Optional
styleReadonly
textThe text to display.
Optional
textTime to fade in text in milliseconds.
[[DEFAULT_FADE_TIME]] 800
Optional
Readonly
tileOptional
userOptional user data. Will be retrieved during picking.
Determines visibility. If set to false
, it will not be rendered.
Static
Readonly
HIGHEST_Text elements with this priority are placed on screen before any others.
The style used to layout this text element, undefined if not set yet.
Sets the style used for text layout.
The style to use.
The list of points in world space used to render the text along a path or undefined
.
The text element position or the first point of the path used to render a curved text, both in world space.
The style used to render this text element, undefined if not set yet.
Sets style used for text rendering.
The style to use.
If true
, TextElement
is allowed to overlap other labels or icons of lower priority.
false
If true
, TextElement
will reserve screen space, other markers of lower priority will not
be able to overlap.
true
Generated using TypeDoc
TextElement
is used to create 2D text elements (for example, labels).