<html>
<head>
<title></title>
<style type="text/css" media="screen">
body {font-family: verdana, arial, helvetica, sans-serif;font-size: 12px;padding: 5px;margin: 0;background-color: #FFF;}
p, ul, li {margin-top: 0;margin-bottom: 0;}
blockquote {margin-left: 5px;}
div.signature {color: #666;font-size: 0.9em;}
</style>
</head>
<body>
Hi,<br />I need an idea to build a layertree with consists not only of baselayers and overlaylayers but also of different sublayers like this:<br />1 - background<br />2 - theme 1<br /> 2-1 theme 1 subpoint A<br /> 2-1-1 subsubpoint A-a<br /> 2-1-2 subsubpoint A-b<br /> 2-1-3 subsubpoint A-c<br /> 2-2 theme 1 subpoint B<br /> 2-2-1 subsubpoint B-a<br /> 2-2-2 subsubpoint B-b<br />3 - theme 2<br /> 3-1 theme 2 subpoint A<br />...<br />I mean it should look like a folder structure we know from our own PC.<br /><br />I tried a layout (taken from tree.js from geoext) with OpenLayers, GeoExt and ExtJS but the structure is not going deep enough. The layers at subsubpoints should come from geoserver.<br /><br /><br />My code is like this:<br /><br />var treeConfig = new OpenLayers.Format.JSON().write([{<br /> nodeType: "gx_baselayercontainer"<br /> }, {<br /> nodeType: "gx_overlaylayercontainer",<br /> expanded: true,<br /> // render the nodes inside this container with a radio button,<br /> // and assign them the group "foo".<br /> loader: {<br /> baseAttrs: {<br /> radioGroup: "foo",<br /> uiProvider: "layernodeui"<br /> }<br /> }<br /> }, {<br /> nodeType: "gx_layer",<br /> layer: "Europäische Union (Gruppe)",<br /> isLeaf: false,<br /> // create subnodes for the layers in the LAYERS param. If we assign<br /> // a loader to a LayerNode and do not provide a loader class, a<br /> // LayerParamLoader will be assumed.<br /> loader: {<br /> param: "LAYERS"<br /> }<br /> }], true);<br /><br /> // create the tree with the configuration from above<br /> tree = new Ext.tree.TreePanel({<br /> border: true,<br /> region: "west",<br /> title: "Ebenen",<br /> width: 200,<br /> split: true,<br /> collapsible: true,<br /> collapseMode: "mini",<br /> autoScroll: true,<br /><br /> loader: new Ext.tree.TreeLoader({<br /> // applyLoader has to be set to false to not interfer with loaders<br /> // of nodes further down the tree hierarchy<br /> applyLoader: false,<br /> uiProviders: {<br /> "layernodeui": LayerNodeUI<br /> }<br /> }),<br /> root: {<br /> nodeType: "async",<br /> // the children property of an Ext.tree.AsyncTreeNode is used to<br /> // provide an initial set of layer nodes. We use the treeConfig<br /> // from above, that we created with OpenLayers.Format.JSON.write.<br /> children: Ext.decode(treeConfig)<br /> },<br /><br /> rootVisible: false,<br /> lines: false<br /><br /> });<br /><br />Is there anyone who can help me? There MUST be any possibility to get well structured tree, or?!<br />Thanks<br />Kathrin<br />
<div class="signature"><br /><br /><br />-- <br />NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!                <br />Jetzt informieren: http://www.gmx.net/de/go/freephone</div></body>
</html>