<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>I am trying to replace my existing LayerList control that was using a grouped WMS layer and the layer params so that the layerlist control would still separate the layers into individual items. My problem is I tried to replace the WMS layer with a grouped
WFS layer (with multiple featureTypes) except only the entire layer will show up inside the layerlist control for checking on/off instead of individual layers. Can this be done?</div>
<div> </div>
<div> </div>
<div>My WFS Layer is declared like the following (with multiple featureTypes)</div>
<div> </div>
<div><font face="Courier New" color="#008000">//Areas of Interest Group (WFS)</font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> layer_AOIs_wfs = <font color="#0000FF">new</font> OpenLayers.Layer.Vector(<font color="#A31515">"Attraction"</font>, {</font></div>
<div><font face="Courier New"> minScale: 125000,</font></div>
<div><font face="Courier New"> maxScale: 99,</font></div>
<div><font face="Courier New"> <font color="#008000">//visibility: false,</font></font></div>
<div><font face="Courier New"> styleMap: (myStyles),</font></div>
<div><font face="Courier New"> rendererOptions: {zIndexing: <font color="#0000FF">true</font>},</font></div>
<div><font face="Courier New"> strategies: [<font color="#0000FF">new</font> OpenLayers.Strategy.BBOX()],</font></div>
<div><font face="Courier New"> protocol: <font color="#0000FF">new</font> OpenLayers.Protocol.WFS({</font></div>
<div><font face="Courier New"> url: wfs,</font></div>
<div><font face="Courier New"> featureType: [<font color="#A31515">"Attraction"</font>, <font color="#A31515">"Fire_Hall"</font>],</font></div>
<div><font face="Courier New"> featureNS: <font color="#A31515">"</font><a href="http://www.intergraph.com/geomedia/gml"><font color="#0000FF"><u>http://www.intergraph.com/geomedia/gml</u></font></a><font color="#A31515">"</font>,</font></div>
<div><font face="Courier New"> featurePrefix: <font color="#A31515">"gmgml"</font>,</font></div>
<div><font face="Courier New"> srsName: <font color="#A31515">"EPSG:3776"</font>,</font></div>
<div><font face="Courier New"> geometryName: <font color="#A31515">"Geometry"</font>,</font></div>
<div><font face="Courier New"> version: <font color="#A31515">"1.1.0"</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"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New">And my layerlist (GeoExt.layerNode) control is like the following except it only loads both the Attraction and FireHall layers into one layer when I expand it, not both.</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">//AOIs layerList</font></font></div>
<div><font face="Courier New"> layerList_AOIs = <font color="#0000FF">new</font> GeoExt.tree.LayerNode({</font></div>
<div><font face="Courier New"> <font color="#A31515">"layer"</font>: layer_AOIs_wfs,</font></div>
<div><font face="Courier New"> <font color="#A31515">"isLeaf"</font>: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> <font color="#A31515">"preloadChildren"</font>: <font color="#0000FF">true</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></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"> node.collapse();</font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> },</font></div>
<div><font face="Courier New"> <font color="#A31515">'load'</font> : <font color="#0000FF">function</font>(e) {</font></div>
<div><font face="Courier New"> <font color="#0000FF">if</font> (bool_aois == <font color="#0000FF">false</font>)</font></div>
<div><font face="Courier New"> {</font></div>
<div><font face="Courier New"> <font color="#008000">//change icon of childNodes to GetLegendGraphic from WMS + node text attribute</font></font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> count = (e.childNodes.length -1);</font></div>
<div><font face="Courier New"> <font color="#0000FF">while</font> (count >= 0)</font></div>
<div><font face="Courier New"> {</font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> label = e.childNodes[count].text; </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> fixed_label = label.replace(/_/g,<font color="#A31515">' '</font>);</font></div>
<div><font face="Courier New"> e.childNodes[count].setText(<font color="#A31515">"<img src='http://localhost/WebServices/Request.aspx?request=GetLegendGraphic&version=1.1.1&format=image/png&style=&layer="</font>+label + <font color="#A31515">"'/>"</font>
+ <font color="#A31515">' '</font> +fixed_label);</font></div>
<div><font face="Courier New"> e.childNodes[count].id = fixed_label;</font></div>
<div><font face="Courier New"> count -=1;</font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> bool_aois = <font color="#0000FF">true</font>;</font></div>
<div><font face="Courier New"> }</font></div>
<div><font face="Courier New"> <font color="#0000FF">else</font></font></div>
<div><font face="Courier New"> {</font></div>
<div><font face="Courier New"> <font color="#008000">//do nothing</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"> <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">I have tried modifying the loader part and instead of "LAYERS" tried featureType but this did not have any affect. Can this be done how I am describing? Appreciate any advice!</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </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>