Used to display text at points on a layer. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: |
Properties
- backgroundColor : color
- color : color
- fontDecoration : Enums.FontDecoration
- fontFamily : string
- fontStyle : Enums.FontStyle
- fontWeight : Enums.FontWeight
- haloColor : color
- haloWidth : real
- horizontalAlignment : Enums.HorizontalAlignment
- kerningEnabled : bool
- outlineColor : color
- outlineWidth : real
- size : real
- text : string
- verticalAlignment : Enums.VerticalAlignment
Signals
- backgroundColorChanged()
- colorChanged()
- fontDecorationChanged()
- fontFamilyChanged()
- fontStyleChanged()
- fontWeightChanged()
- haloColorChanged()
- haloWidthChanged()
- horizontalAlignmentChanged()
- kerningEnabledChanged()
- outlineColorChanged()
- outlineWidthChanged()
- sizeChanged()
- textChanged()
- verticalAlignmentChanged()
Detailed Description
Text symbols are used to display text for graphics. The graphics can be based on any type of geometry - point, multipoint, polyline, or polygon.
Example:
Create a TextSymbol and apply it to a Graphic:
var textSymbol = ArcGISRuntimeEnvironment.createObject("TextSymbol", { color: "black", text: "Redlands", size: 12.0, horizontalAlignment: Enums.HorizontalAlignmentRight, verticalAlignment: Enums.VerticalAlignmentMiddle }); var point = ArcGISRuntimeEnvironment.createObject("Point", {x: -117, y: 34}); var graphic = ArcGISRuntimeEnvironment.createObject("Graphic", {geometry: point, symbol: textSymbol});
See also JsonSerializable.
Property Documentation
backgroundColor : color |
The color for the text symbol background.
color : color |
The color of the text.
The font decoration of the text.
See also Enums.FontDecoration.
haloColor : color |
The color of the halo.
The horizontal alignment for the text.
Returns HorizontalAlignment::Center if an error occurs.
See also Enums.HorizontalAlignment.
Whether kerning (visual adjustments to the spacing between characters in the text) is enabled.
The default value is false
.
outlineColor : color |
The color of the outline.
The vertical alignment for the text.
Returns Enums.VerticalAlignmentMiddle if an error occurs.
See also Enums.VerticalAlignment.
Signal Documentation
Emitted when the backgroundColor property changes.
Note: The corresponding handler is onBackgroundColorChanged
.
Emitted when the color property changes.
Note: The corresponding handler is onColorChanged
.
Emitted when the fontDecoration property changes.
Note: The corresponding handler is onFontDecorationChanged
.
Emitted when the fontFamily property changes.
Note: The corresponding handler is onFontFamilyChanged
.
Emitted when the fontStyle property changes.
Note: The corresponding handler is onFontStyleChanged
.
Emitted when the fontWeight property changes.
Note: The corresponding handler is onFontWeightChanged
.
Emitted when the haloColor property changes.
Note: The corresponding handler is onHaloColorChanged
.
Emitted when the haloWidth property changes.
Note: The corresponding handler is onHaloWidthChanged
.
Emitted when the horizontalAlignment property changes.
Note: The corresponding handler is onHorizontalAlignmentChanged
.
Emitted when the kerningEnabled property changes.
Note: The corresponding handler is onKerningEnabledChanged
.
Emitted when the outlineColor property changes.
Note: The corresponding handler is onOutlineColorChanged
.
Emitted when the outlineWidth property changes.
Note: The corresponding handler is onOutlineWidthChanged
.
Emitted when the size property changes.
Note: The corresponding handler is onSizeChanged
.
Emitted when the text property changes.
Note: The corresponding handler is onTextChanged
.
Emitted when the verticalAlignment property changes.
Note: The corresponding handler is onVerticalAlignmentChanged
.