TextSymbol QML Type

Used to display text at points on a layer. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

MarkerSymbol

Properties

Signals

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.


fontDecoration : Enums.FontDecoration

The font decoration of the text.

See also Enums.FontDecoration.


fontFamily : string

The font family for the text.


fontStyle : Enums.FontStyle

The font style for the text.

Returns FontStyle::Normal if an error occurs.

/sa Enums.FontStyle


fontWeight : Enums.FontWeight

The font weight for the text.

Returns FontWeight::Normal if an error occurs.

/sa Enums.FontWeight


haloColor : color

The color of the halo.


haloWidth : real

The width of the halo in device independent pixels (DIPs).


horizontalAlignment : Enums.HorizontalAlignment

The horizontal alignment for the text.

Returns HorizontalAlignment::Center if an error occurs.

See also Enums.HorizontalAlignment.


kerningEnabled : bool

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.


outlineWidth : real

The width of the outline in device independent pixels (DIPs).


size : real

The size of the text in device independent pixels (DIPs).


text : string

The text to display for the symbol.


verticalAlignment : Enums.VerticalAlignment

The vertical alignment for the text.

Returns Enums.VerticalAlignmentMiddle if an error occurs.

See also Enums.VerticalAlignment.


Signal Documentation

backgroundColorChanged()

Emitted when the backgroundColor property changes.

Note: The corresponding handler is onBackgroundColorChanged.


colorChanged()

Emitted when the color property changes.

Note: The corresponding handler is onColorChanged.


fontDecorationChanged()

Emitted when the fontDecoration property changes.

Note: The corresponding handler is onFontDecorationChanged.


fontFamilyChanged()

Emitted when the fontFamily property changes.

Note: The corresponding handler is onFontFamilyChanged.


fontStyleChanged()

Emitted when the fontStyle property changes.

Note: The corresponding handler is onFontStyleChanged.


fontWeightChanged()

Emitted when the fontWeight property changes.

Note: The corresponding handler is onFontWeightChanged.


haloColorChanged()

Emitted when the haloColor property changes.

Note: The corresponding handler is onHaloColorChanged.


haloWidthChanged()

Emitted when the haloWidth property changes.

Note: The corresponding handler is onHaloWidthChanged.


horizontalAlignmentChanged()

Emitted when the horizontalAlignment property changes.

Note: The corresponding handler is onHorizontalAlignmentChanged.


kerningEnabledChanged()

Emitted when the kerningEnabled property changes.

Note: The corresponding handler is onKerningEnabledChanged.


outlineColorChanged()

Emitted when the outlineColor property changes.

Note: The corresponding handler is onOutlineColorChanged.


outlineWidthChanged()

Emitted when the outlineWidth property changes.

Note: The corresponding handler is onOutlineWidthChanged.


sizeChanged()

Emitted when the size property changes.

Note: The corresponding handler is onSizeChanged.


textChanged()

Emitted when the text property changes.

Note: The corresponding handler is onTextChanged.


verticalAlignmentChanged()

Emitted when the verticalAlignment property changes.

Note: The corresponding handler is onVerticalAlignmentChanged.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close