Dear Andreas,<br><br>Thank you for your quick reply. I tried assigning the overlay container with a loader group and it is not working for me still :(<br><br>function childContainerRadioButtons(text, layerStore, parent, iconCls){<br>
<br> parent.appendChild(new GeoExt.tree.OverlayLayerContainer({<br> text: text,<br> layerStore: layerStore,<br> expanded: true,<br> iconCls: iconCls, //If not specified, defaults to original image<br>
loader:{<br> baseAttrs:{<br> radioGroup: "foo"<br> }<br> }<br> }));<br> <br>}//end childContainerRadioButtons<br><br>I tried group: "foo" also..as for what was I expecting the loader to do with {param: "LAYERS"}, thats a good question...for some reason I thought I needed that...<br>
<br>If anyone might know why is still isn't working for me, please drop me a hint ;)<br><br>Thank you for your time,<br><br>elshae<br><br><div class="gmail_quote">On Wed, Nov 24, 2010 at 2:59 AM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<div class="im"><br>
On Nov 23, 2010, at 22:01 , IT Intern wrote:<br>
<br>
> Hello GeoExt users,<br>
><br>
> I have an Ext.tree.TreePanel that I later add a layer to one of it's child containers after that container has been created. The child container is an GeoExt.tree.OverlayLayerContainer. The two things that I am struggling with are how to set the tree nodes of an GeoExt.tree.OverlayLayerContainer to radio buttons instead of checkboxes?<br>
<br>
</div>Configure the nodes with a group attribute. Then you will get a radio button instead of a checkbox, which will also make the checked layer mutually exclusive:<br>
<br>
loader: {<br>
baseAttrs: {group: "foo"}<br>
<div class="im">}<br>
<br>
> and how do I add nodes later on to the container?<br>
<br>
</div>The OverlayLayerContainer is synchronized with the map's layers. No need to add nodes manually.<br>
<div class="im"><br>
<br>
> My attempt at this is below:<br>
><br>
> function childContainer(text, layerStore, parent, iconCls){<br>
><br>
><br>
> parent.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
><br>
> text<br>
> : text,<br>
> layerStore: layerStore,<br>
><br>
> expanded<br>
> : true,<br>
> iconCls: iconCls, //If not specified, defaults to original image<br>
><br>
> loader<br>
> : {param: "LAYERS"}<br>
<br>
</div>What are you expecting this loader to do? The OverlayLayerContainer uses a LayerLoader, which has no param config option.<br>
<br>
Regards,<br>
Andreas.<br>
<div class="im"><br>
><br>
><br>
> }));<br>
><br>
> }//end childContainer<br>
><br>
> //Container for photo layers<br>
><br>
> childContainer<br>
> ("Photo Layers", photoLayers, layerRoot);<br>
><br>
><br>
> //In another function<br>
> map.addLayer(vectorPano);<br>
><br>
><br>
> layerStore.loadData([vectorPano], true);<br>
><br>
><br>
> var panoNode = new Ext.tree.TreeNode({<br>
><br>
> leaf<br>
> : true,<br>
> text: 'Panoramio Photos',<br>
><br>
><br>
> checked: false<br>
><br>
> });<br>
><br>
> panoNode<br>
> .addListener("radiochange", function(){<br>
><br>
> vectorPano<br>
> .setVisibility(true);<br>
> });<br>
><br>
><br>
> var layerContainer = layerRoot.findChild('text', 'Photo Layers');<br>
><br>
> layerContainer<br>
> .appendChild(panoNode);<br>
> Currently a node is added, but it is a checkbox and when it is clicked on and off it does not turn the layer on/off. I'd prefer radio buttons nodes..<br>
><br>
> Thank you for your time,<br>
><br>
> elshae<br>
><br>
><br>
</div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
> <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
<br>
</font></blockquote></div><br>