<p>Hi!<br>I'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: "Alla lager",<br>
expanded: true<br>});<br>//*********************************************** <br>layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({<br>text: "Baslager",<br>map: map,<br>expanded: true<br>}));</p>
<p>layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>text: "Övriga",<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: "Div layers",<br>
layerStore: tibNaturalLayers,<br> expanded: false,<br> loader: {param: "LAYERS"}<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: "More layers",<br> layerStore: tibNaturalLayers1,<br> expanded: false,<br> loader: {param: "LAYERS"}<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>