Heron.widgets.LayerLegendPanel

Extends
xtype
hr_layerlegendpanel
class Heron.widgets.LayerLegendPanel(config)

A panel designed to hold legends for Map Layers (WMS GetLegendGraphic results). Optionally enable prefetching Legends before Layer becomes visible.

 items: [
    {
              xtype: 'hr_layerlegendpanel',
              defaults: {
                      useScaleParameter : false,
                      baseParams: {
                          // Override default image/gif in WMS GetLegendGraphic
                              FORMAT: 'image/png'
                      }
              },
              hropts: {
                      // Preload Legends on initial startup
                      // Will fire WMS GetLegendGraphic's for WMS Legends
                      // Otherwise Legends will be loaded only when Layer
                      // becomes visible. Default: false
                      prefetchLegends: false
              }
      }
]

Config Options

Configuration properties in addition to those listed for GeoExt.LegendPanel.

defaults

Optional parameters to add to the legend url, this can e.g. be used to support vendor-specific parameters in a SLD WMS GetLegendGraphic request. To override the default MIME type of image/gif use the FORMAT parameter in defaults.baseParams. See GeoExt WMSLegend.js

legendFromCapabilities

Always get legend URL from Capabilities document i.s.o. via WMS GetLegendGraphic. default value is false.

legendFromCapabilitiesPatterns

Get legend URL from Capabilities document i.s.o. via WMS GetLegendGraphic for these server URL substrings. Some WMS’s do not support GetLegendGraphic or have pre-configured elaborate Legend images. In those cases the Capabilities document provides a legend URL in the Style section for a Layer. Type is String array. default value is [‘dino’].