Sample code showing how to configure a Heron LayerCombo. Note the main config layerFilter, a function to select a subset of Layers from the Map. Default is all Map Layers. When a Layer is selected the ‘selectlayer’ event is fired.
{
xtype: "hr_layercombo",
id: "hr_layercombo",
layerFilter: function (map) {
return map.getLayersByClass('OpenLayers.Layer.WMS');
}
}
Configuration properties in addition to those listed for Ext.form.ComboBox.
See http://www.dev.sencha.com/deploy/dev/docs/source/TextField.html#cfg-Ext.form.TextField-emptyText, default value is “Choose a Base Layer”.
OpenLayers.Map or Object A configured map or a configuration object for the map constructor, required only if zoom is set to value greater than or equal to 0.
Boolean utomatically select the first layer? Default false.
String How should the layer names be sorted in the selector, ‘ASC’, ‘DESC’ or null (as Map order)? default value is ‘ASC’ (Alphabetically Ascending).
GeoExt.data.LayerStore A configured LayerStore
See http://www.dev.sencha.com/deploy/dev/docs/source/TextField.html#cfg-Ext.form.TextField-emptyText, default value is “Basemaps”.