Legend widget

The Legend widget displays labels and symbols for layers in the scene. It supports FeatureLayer, SceneLayer, MapImageLayer, and TileLayer. The legend automatically updates when the visibility of a layer or sublayer changes.

Caution:

Currently 3D symbols with more than one symbol layer are not supported, and the size in volumetric 3D symbols, such as polygon extrusion, is not depicted by the Legend widget. See JSAPI Legend for more information.

Configure the Legend widget

This widget can be set to open automatically when an app starts. Click the Do not open this widget when the app starts button Do not open this widget when the app starts on the widget to turn on the option to open the widget automatically. (For widgets you need to add to the app first, you can make this setting after configuring the widget.)

There is no configuration for the Legend widget.

Use the Legend widget

To use the Legend widget, do the following:

  1. When the app starts, click the Legend widget to open the Legend window.
  2. To close the Legend window, click the close button (x) in the upper-right corner of the window.