Text symbols are used to add text to a feature (labeling).

Referenced by: labelingInfo, symbol

Properties

PropertyDetails
angleA numeric value that defines the number of degrees (0 to 360) that a text symbol is rotated. The rotation is from East in a counter-clockwise direction where East is the 0° axis.
backgroundColorBackground color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
borderLineColorBorderline color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
borderLineSizeNumeric value indicating the the size of the border line in points.
colorColor is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
fontAn object specifying the font used for the text symbol.
haloColorColor of the halo around the text.
haloSizeNumeric value indicating the point size of a halo around the text symbol.
horizontalAlignmentOne of the following string values representing the horizontal alignment of the text.
Valid values:
  • center
  • justify
  • left
  • right
kerningBoolean value indicating whether to adjust the spacing between characters in the text string.
rightToLeftBoolean value, set to true if using Hebrew or Arabic fonts.
rotatedBoolean value indicating whether every character in the text string is rotated.
textA string value used for text graphics in map notes layers.
typeSpecifies the type of symbol used.
Valid value of this property esriTS
verticalAlignmentOne of the following string values representing the vertical alignment of the text.
Valid values:
  • baseline
  • bottom
  • middle
  • top
xoffsetNumeric value indicating the offset on the x-axis in points.
yoffsetNumeric value indicating the offset on the y-axis in points.

Text Symbol Example

{
"type": "esriTS",
"color": [
78,
78,
78,
255
],
"backgroundColor": [
0,
0,
0,
0
],
"borderLineSize": 2,
"borderLineColor": [
255,
0,
255,
255
],
"haloSize": 2,
"haloColor": [
0,
255,
0,
255
],
"verticalAlignment": "bottom",
"horizontalAlignment": "left",
"rightToLeft": false,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"kerning": true,
"font": {
"family": "Arial",
"size": 12,
"style": "normal",
"weight": "bold",
"decoration": "none"
}
}