drawingInfo

The drawingInfo object contains drawing information for a feature layer.

Properties

Property Details
fixedSymbols Only used for feature collections with a renderer. The feature's symbol is defined by the layer's renderer.
labelingInfo An object defining the properties used for labeling the layer. If working with Map Image layers, this property is only applicable if the layer is enabled with dynamic layers
renderer An object defined which provides the symbology for the layer. If working with Map Image layers, this property is only applicable if the layer is enabled with dynamic layers
scaleSymbols Boolean property indicating whether symbols should stay the same size in screen units as you zoom in. A value of false means the symbols stay the same size in screen units regardless of the map scale.
showLabels Defines whether a labels should be shown or not. This is only valid for sublayers.
transparency Number value ranging between 0 (no transparency) to 100 (completely transparent).

Example

{
  "drawingInfo": {
    "showLabels": true,
    "renderer": {
      "type": "simple",
      "symbol": {
        "color": [
          156,
          83,
          0,
          255
        ],
        "width": 6.75,
        "type": "esriSLS",
        "style": "esriSLSSolid"
      }
    },
    "labelingInfo": [
      {
        "labelExpression": "[Name]",
        "labelExpressionInfo": {
          "value": "{Name}"
        },
        "useCodedValues": false,
        "maxScale": 0,
        "minScale": 0,
        "where": "",
        "labelPlacement": "esriServerLinePlacementCenterAlong",
        "symbol": {
          "color": [
            51,
            51,
            51,
            255
          ],
          "type": "esriTS",
          "horizontalAlignment": "center",
          "rightToLeft": false,
          "angle": 0,
          "xoffset": 0,
          "yoffset": 0,
          "text": "",
          "rotated": false,
          "kerning": true,
          "font": {
            "size": 24,
            "style": "normal",
            "decoration": "none",
            "weight": "bold",
            "family": "Arial"
          }
        }
      }
    ]
  }
}

Feedback on this topic?