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.

The following table lists 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
  }
}