The Legend widget displays labels and symbols for layers in the map. It supports dynamic, tiled, image, feature, KML layer types, and WMS layers with an associated legend URL. The Legend widget can be set to automatically update when the visibility of a layer or sublayer changes. When no operational layers are rendered in the map, the Legend widget is blank.
Basemaps are not shown in the Legend widget by default. The order in which layers appear in the Legend widget corresponds to the layer order in the map. The widget can also be set to respect the scale dependencies of the layers in the map. This can be a useful indicator to map readers that additional data layers are present in the map but currently not displayed in the map because of scale dependencies.
Configure the Legend widget
This widget can be set to open automatically when an app starts. To enable this feature, click the Open this widget automatically when the app starts button on the widget, which turns it dark green.
- Hover over the widget and click the Configure this widget button to open the configuration properties dialog box.
- Optionally click Change widget icon if you want to replace the default icon for this widget.
A file explorer window opens allowing you to browse to a local image file to use as the widget icon.
- Select an arrangement. There are two options, LEFT and RIGHT (LEFT is the default arrangement).
- Check or uncheck the Auto Update check box.
When this option is checked, the Legend widget automatically updates if the visibility of a layer or sublayer changes.
- Check or uncheck the Respect Current Map Scale check box.
When this option is checked, the Legend widget only shows symbols and labels for layers visible at the current map scale.
- Click OK to close this window.
This opens the configuration window for this widget.
Use the Legend widget
When the application starts, the Legend widget is automatically enabled. Clicking the Legend widget displays the legend window. Clicking the X button in the upper right corner of the legend window closes it.