Hello GeoExt,<br><br>I have a GeoExt.LegendPanel which is working just fine for layers which are not grouped. However, the grouped layers do not show any icon in the LegendPanel. I have tried to create the group layer various ways, using the exact name of the layer group in Geoserver and aldo by specifying a layer string in code. I've been looking around for a while now, but I don't see what I am missing..<br>
<br>Here is relevant code:<br><br>//Layer Group<br>var geography2 = new OpenLayers.Layer.WMS(<br> "Geography2", "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>", {layers: 'cite:geog_multipol_vw,cite:geog_multiline_vw', transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true, visibility: true, minScale: 27734017.045258757} <br>
);<br><br>//LegendPanel config<br>var legend = new GeoExt.LegendPanel({<br> region: "east",<br> title: "Legend",<br> width: 200,<br> autoScroll: true,<br>
layerStore: mapPanel.layers<br> });<br><br>//Explicitly point LegendPanel to GetLegendGraphic on WMS Geoserver for GeoWebCached Layers<br> var LayerRec;<br> for(var l = 4; l < map.layers.length; l++)<br>
{<br> LayerRec = mapPanel.layers.getAt(l);<br> LayerRec.set("legendURL","<a href="http://localhost:8080/geoserver/wms?TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.se_xml&FORMAT=image%2Fgif&LAYER=">http://localhost:8080/geoserver/wms?TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.se_xml&FORMAT=image%2Fgif&LAYER=</a>" + map.layers[l].params["LAYERS"]);<br>
}<br><br>Thanks for your time in trying to help me :),<br><br>elshae<br>