<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Is it possible to show a legend graphic which is returned from my WMS GetLegendGraphic request next to each item on the LayerNode after it is expanded? (or before.. Or whenever as long as it shows).</div>
<div> </div>
<div>I declare my layernode like so -</div>
<div> </div>
<div><font face="Courier New" color="#008000">//Trails layerList</font></div>
<div><font face="Courier New"> layerList_Trails = <font color="#0000FF">new</font> GeoExt.tree.LayerNode({</font></div>
<div><font face="Courier New"> <font color="#A31515">"layer"</font>: layer_Trails,</font></div>
<div><font face="Courier New"> <font color="#A31515">"isLeaf"</font>: <font color="#0000FF">false</font>,</font></div>
<div><font face="Courier New"> <font color="#A31515">"checked"</font>: <font color="#0000FF">false</font>,</font></div>
<div><font face="Courier New"> <font color="#A31515">"enableDD"</font>: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> <font color="#A31515">"cls"</font>: <font color="#A31515">"rootnode"</font>,</font></div>
<div><font face="Courier New"> <font color="#A31515">"singleClickExpand"</font>: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> <font color="#A31515">"listeners"</font>: {</font></div>
<div><font face="Courier New"> <font color="#A31515">'checkchange'</font> : <font color="#0000FF">function</font>(node, checked)</font></div>
<div><font face="Courier New"> {</font></div>
<div><font face="Courier New"> <font color="#008000">// If a parent node is unchecked, uncheck all the children</font></font></div>
<div><font face="Courier New"> <font color="#0000FF">if</font> (node.getUI().isChecked()) {</font></div>
<div><font face="Courier New"> node.expand();</font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> <font color="#0000FF">if</font> (!node.getUI().isChecked())</font></div>
<div><font face="Courier New"> {</font></div>
<div><font face="Courier New"> node.collapse();</font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> },</font></div>
<div><font face="Courier New"> <font color="#A31515">"loader"</font>: {</font></div>
<div><font face="Courier New"> <font color="#A31515">"param"</font>: <font color="#A31515">"LAYERS"</font></font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> });</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New">Which is added to my root -</font></div>
<div><font face="Courier New">layerRoot_Legend.appendChild(layerList_Trails);</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New">And then my treepanel</font></div>
<div><font face="Courier New"> </font></div>
<div> var layerRoot_Legend = new Ext.tree.TreeNode({</div>
<div> enableDD: true,</div>
<div> text: "All Legend Items",</div>
<div> loaded: true,</div>
<div> expanded: true</div>
<div> });</div>
<div> </div>
<div> var layerTree_Legend = new Ext.tree.TreePanel({</div>
<div> title: '',</div>
<div> root: layerRoot_Legend,</div>
<div> enableDD: true,</div>
<div> applyLoader: true,</div>
<div> rootVisible: false</div>
<div> });</div>
<div> </div>
<div><font color="#000080"> </font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Verdana, sans-serif" color="#000080">Except previously when I declared my layers individually I had put an <img> tag with the right layer next to each.. But now I am declaring them in groups like
-</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Times New Roman, serif" size="3"> //Trails Group<br>
var layer_Trails = new OpenLayers.Layer.WMS("<img src='http://localhost/WebService/Request.aspx?request=GetLegendGraphic&version=1.1.1&format=image/png&layer=Asphalt' alt=''/>Trails", "<a href="http://localhost/WebService/Request.aspx"><font color="#0000FF"><u>http://localhost/WebService/Request.aspx</u></font></a>",</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Times New Roman, serif" size="3"> {<br>
layers: ['Onstreet_Bike_Route', 'Mountain_-_Stunt_Biking', 'Equestrian', 'Gravel_or_Shale', 'Asphalt'],</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Times New Roman, serif" size="3"> VERSION: "1.1.1",<br>
transparent: true<br>
},<br>
{ isBaseLayer: false,<br>
singleTile: true,<br>
visibility: false,<br>
buffer: 1,<br>
ratio: 1<br>
}</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Times New Roman, serif" size="3">But this only puts the image on the actual group name and I need it to be beside each legend entry when it is expanded. Is there a place somewhere I can stick this
image tag and either hard code the layer name or have it be returned from the childNodes of the tree and get it to show this image beside each childNode? Appreciate any assistance!</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div> </div>
</font>
<DIV><P><HR>
This e-mail is intended for the original recipient(s) only. If you have received it in error, please advise the sender and delete this message.
</P></DIV>
</body>
</html>