Legend

The Legend widget displays labels and symbols for layers on the map. If specified, the legend respects scale dependencies and only displays layers and sublayers visible on the current map. The legend automatically updates if the visibility of a layer or sublayer changes.

Configurable attributes

The following table describes the configurable attributes of the Legend widget.

AttributeDescription

legend

An object of ArcGIS API for JavaScript. See the Legend Constructor parameters.

:

Example

{
  "legend":{
    "arrangement": 0,
    "autoUpdate": true,
    "respectCurrentMapScale": true
  }
}

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