[Users] Group Layers Do Not Display in Legend Panel
IT Intern
itintern12 at gmail.com
Wed Nov 10 19:16:09 CET 2010
Hello GeoExt,
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..
Here is relevant code:
//Layer Group
var geography2 = new OpenLayers.Layer.WMS(
"Geography2", "http://localhost:8080/geoserver/wms",
{layers: 'cite:geog_multipol_vw,cite:geog_multiline_vw', transparent: true},
{isBaseLayer: false, displayInLayerSwitcher: true, visibility: true,
minScale: 27734017.045258757}
);
//LegendPanel config
var legend = new GeoExt.LegendPanel({
region: "east",
title: "Legend",
width: 200,
autoScroll: true,
layerStore: mapPanel.layers
});
//Explicitly point LegendPanel to GetLegendGraphic on WMS Geoserver for
GeoWebCached Layers
var LayerRec;
for(var l = 4; l < map.layers.length; l++)
{
LayerRec = mapPanel.layers.getAt(l);
LayerRec.set("legendURL","
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="
+ map.layers[l].params["LAYERS"]);
}
Thanks for your time in trying to help me :),
elshae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101110/504d6bbb/attachment.htm
More information about the Users
mailing list