<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16440"></HEAD>
<BODY>
<DIV><FONT face=Arial><FONT size=2><SPAN class=884505206-22052012>Hi
all,</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012></SPAN></FONT></FONT> </DIV>
<DIV><SPAN class=884505206-22052012></SPAN><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012>below I have a Ext.tree.TreePanel with legend
in child nodes (code below). I m trying to have all legend image snot
expanded (shown) when the layers is not checked on initial loading of the map
e.g. but I could not figure out how to achieve this. So far I tried to
put </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=884505206-22052012>expanded:
false,<BR>all over the place to no avail.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=884505206-22052012>Any hints
how I can get this working ?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012>Cheers</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012>Karsten</SPAN></FONT></FONT><FONT face=Arial><FONT
size=2><SPAN class=884505206-22052012></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012>...</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=884505206-22052012></SPAN>{nodeType:
"gx_layercontainer",<BR> text:
'Kartendaten',<BR> layerStore:
mapPanel.layers,<BR> expanded:
false,<BR> loader:
{<BR> filter:
function(record) {
<BR>
return record.get("layer").group == "Kartendaten";// this.group;
<BR>
},<BR>
baseAttrs:
{<BR>
uiProvider:
"custom_ui",<BR>
},<BR>
createNode: function(attr)
{<BR>
// add a WMS legend to each node
created<BR>
if(attr.layer instanceof OpenLayers.Layer.WMS
&&<BR>
attr.layer.url.indexOf('tilecache') > 0)
{<BR>
attr.component =
{<BR>
xtype:
"gx_legendimage",<BR>
url:
"/proxy/gotomaplegend.cgi?TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.se_xml&FORMAT=image%2Fgif&LAYER="+attr.layer.params.LAYERS.substr(7),<BR>
cls:
"legend",<BR>
};<BR>
} else
{<BR>
attr.component =
{<BR>
xtype:
"gx_wmslegend",<BR>
layerRecord:
mapPanel.layers.getByLayer(attr.layer),<BR>
showTitle:
false,<BR>
cls:
"legend",<BR>
};<BR>
}<BR>
return GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
<BR>
}
<BR> }
<BR> }</FONT></FONT></DIV>
<DIV><SPAN class=884505206-22052012><FONT size=2
face=Arial>...</FONT></SPAN></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV align=left>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 11pt"></SPAN> </P></DIV><br/><br/><br><br><FONT face="Tahoma" size="2"><br>=======<br>Email scanned by PC Tools - No viruses or spyware found.<br>(Email Guard: 9.0.0.888, Virus/Spyware Database: 6.19680)<br><a href=http://www.pctools.com/?cclick=EmailFooterClean_51>http://www.pctools.com</a><br>=======</FONT>
</BODY></HTML>