<p>Hi!<br>I&#39;m trying to make a tree with sublayers.<br>My code to make the tree is like:<br> <br>//***********************************************<br>var layerRoot = new Ext.tree.TreeNode({<br>text: &quot;Alla lager&quot;,<br>
expanded: true<br>});<br>//***********************************************  <br>layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({<br>text: &quot;Baslager&quot;,<br>map: map,<br>expanded: true<br>}));</p>
<p>layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>text: &quot;Övriga&quot;,<br>map: map,<br>expanded: true<br>}));<br>//***********************************************<br>var tibNaturalLayers = new GeoExt.data.LayerStore({<br>
                    map: map,<br>                    initDir: 0,<br>                    layers: [riks1,riks2]<br> });<br> <br>layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>                        text: &quot;Div layers&quot;,<br>
                        layerStore: tibNaturalLayers,<br>                        expanded: false,<br>                        loader: {param: &quot;LAYERS&quot;}<br> }));<br>//***********************************************<br>
var tibNaturalLayers1 = new GeoExt.data.LayerStore({<br>                    map: map,<br>                    initDir: 0,<br>                    layers: [fast]<br> });<br> <br>layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
                        text: &quot;More layers&quot;,<br>                        layerStore: tibNaturalLayers1,<br>                        expanded: false,<br>                        loader: {param: &quot;LAYERS&quot;}<br>
 }));<br>//***********************************************<br> <br>With enableDD: true in the treepanel I can drag the layer so I get the tree I want, se attached file treewithsublevels4.jpg.<br>What shall I change in my code to get the tree like the one in treewithsublevels4.jpg</p>

<p>Lars-Göran Edholm<br>Bygg- och miljöförvaltningen<br>Sandvikens kommun</p>