...
The Legend widget displays labels and symbols for layers in the map. It supports dynamic, tiled, image, feature, and KML layer types as well as WMS layers with an associated legend URL. When no operational layers are rendered in the map, the Legend widget is blank.
...