A panel showing legends of all layers in a layer store. Depending on the layer type, a legend renderer will be chosen.
The LegendPanel will include legends for all the layers in the layerStore it is configured with, unless the layer is configured with displayInLayerSwitcher: false, or a layer record has a hideInLegend field with a value of true. Additional filtering can be done by configuring a filter on the LegendPanel.
Configuration properties in addition to those listed for Ext.Panel.
Function A function, called in the scope of the legend panel, with a layer record as argument. Is expected to return true for layers to be displayed, false otherwise. By default, all layers will be displayed.
filter: function(record) {
return record.getLayer().isBaseLayer;
}