The labelingInfo object specifies the label definition for a layer.

Referenced by: drawingInfo, Feature Reduction Binning Drawing Info, Feature Reduction Cluster Drawing Info


Property Details
allowOverrun Specifies whether or not a label can overrun the geometry feature being labeled. Only applicable to labels for lines or polygons.
deconflictionStrategy Specifies the approach to use for deconflicting labels with this class against existing, more important, labels. The option 'none' uses the preferred position and can overlap existing labels and features. The option 'static' uses the preferred position but will not overlap existing labels or features. The option 'dynamic' will try to find a position to avoid overlap of labels and features. The option 'dynamicNeverRemove' will choose the position that minimizes overlap of labels and features but can overlap them if necessary.
Valid values:
  • dynamic
  • dynamicNeverRemove
  • none
  • static
fieldInfos[] An array of objects providing formatting information for the label field.
labelExpression This read-only web map property allows formatting of labels. Use labelExpressionInfo instead.
labelExpressionInfo This object allows label text to be read similar to that of the popupInfo's description property.
labelPlacement This string property specifies the label placement with respect to that of its feature. A list of label placement values categorized by feature geometry types.
Valid values: esriServerLinePlacementAboveAfter, esriServerLinePlacementAboveAlong, esriServerLinePlacementAboveBefore, esriServerLinePlacementAboveEnd, esriServerLinePlacementAboveStart, esriServerLinePlacementBelowAfter, esriServerLinePlacementBelowAlong, esriServerLinePlacementBelowBefore, esriServerLinePlacementBelowEnd, esriServerLinePlacementBelowStart, esriServerLinePlacementCenterAfter, esriServerLinePlacementCenterAlong, esriServerLinePlacementCenterBefore, esriServerLinePlacementCenterEnd, esriServerLinePlacementCenterStart, esriServerPointLabelPlacementAboveCenter, esriServerPointLabelPlacementAboveLeft, esriServerPointLabelPlacementAboveRight, esriServerPointLabelPlacementBelowCenter, esriServerPointLabelPlacementBelowLeft, esriServerPointLabelPlacementBelowRight, esriServerPointLabelPlacementCenterCenter, esriServerPointLabelPlacementCenterLeft, esriServerPointLabelPlacementCenterRight, esriServerPolygonPlacementAlwaysHorizontal
lineConnection Specifies the approach to use for connecting line labels with this class. The option 'none' specifies that line connection should not be performed. The option 'minimizeLabels' connects lines through intersections while 'unambiguousLabels' allows for labels on sides of intersections to clarify ambiguity with label and feature relationships.
Valid values:
  • minimizeLabels
  • none
  • unambiguousLabels
maxScale Represents the maximum scale at which the layer definition will be applied.
minScale Represents the minimum scale at which the layer definition will be applied.
multiPart Specifies the approach to use for labeling parts and segments of geometries.
Valid values:
  • labelLargest
  • labelPerFeature
  • labelPerPart
  • labelPerSegment
name The name of the label class.
priority The priority of the label class relative to other label classes. Numbers are positive with 0 being the most important and higher numbers being less important.
removeDuplicates Specifies whether or not to remove duplicates and if removing duplicate labels whether or not to do it within just this label class, within all labels of that feature type (e.g. point layers) or across all layers. The removeDuplicatesDistance is used when a value other than none is set.
Valid values:
  • all
  • featureType
  • labelClass
  • none
removeDuplicatesDistance The screen distance in points to remove duplicates within. The value 0 is a special value and indicates to remove duplicates for the entire extent.
repeatLabel A boolean value indicating whether or not to repeat the label along the feature. If true, the label will be repeated according to the repeatLabelDistance.
repeatLabelDistance The repeat label distance used when repeatLabel is true. It represents a screen distance in points.
stackAlignment This string property indicates whether or not to derive stacking from the text symbol or have dynamic stacking based on the relative position of the label to the feature.
Valid values:
  • dynamic
  • textSymbol
stackLabel Boolean value indicating whether or not to stack labels for this label class.
symbol The text symbol used to label.
textLayout Optional specification, once the text is positioned, of how the text should be oriented based on the feature geometry. If this property is present, it must be one of the following values:
  • followFeature
  • horizontal
  • perpendicular
  • straight

A value of followFeature will make the text curve to follow a line feature (e.g. road or river). A value of horizontal will make the text be written horizontally with respect to the page. A value of straight will make the text straight and angled depending on the feature geometry: (point) rotated by the specified angle, (line) placed at an angle that follows the line, (polygon) angled to represent the shape of the polygon. A value of perpendicular will make the text rotated 90 degrees clockwise from the angle it would have used for straight.
The default value is horizontal for labels attached to point and polygon features, and followFeature for labels attached to line features.
Valid values:
  • followFeature
  • horizontal
  • perpendicular
  • straight
useCodedValues Boolean value indicating whether to display the coded values for the specified field name(s).
where String template used to determine which features to label.


  "labelExpression": "[ACRES]",
  "labelExpressionInfo": {
    "value": "{ACRES}"
  "fieldInfos": [
      "fieldName": "ACRES",
      "format": {
        "places": 2,
        "digitSeparator": true
  "useCodedValues": false,
  "maxScale": 0,
  "minScale": 0,
  "labelPlacement": "esriServerPointLabelPlacementAboveLeft",
  "symbol": {
    "color": [
    "type": "esriTS",
    "haloSize": 0,
    "horizontalAlignment": "center",
    "rightToLeft": false,
    "angle": 0,
    "xoffset": 0,
    "yoffset": 0,
    "text": "",
    "rotated": false,
    "kerning": true,
    "font": {
      "size": 9.75,
      "style": "normal",
      "decoration": "none",
      "weight": "bold",
      "family": "Arial"

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