|
Hi all, until now I only used OpenLayers and GeoExt with the experience gained from several tutoials ;) I created MapPanels and LayerTrees like this... root: new GeoExt.tree.LayerContainer({ layerStore: mapPanel.layers, expanded: true }), Now I tried to define a customized layerlist with sublayers and make them visible in map onClick: var layerList =[{
"text":"Land use", "children":[{
"nodeType":"gx_layer", "layer":"wms" },{
"nodeType":"gx_layer", "layer":"MAS" },{
"nodeType":"gx_layer", "layer":"MRS" }] },{
"text":"Air quality and health", "children":[{
"nodeType":"gx_layer", "layer":"wms2" },{
"nodeType":"gx_layer", "layer":"GMAS" },{
"nodeType":"gx_layer", "layer":"MRS" }] }] ;
var tree = new Ext.tree.TreePanel({
region: 'west',
title: "Layers",
width: 200,
autoScroll: true,
enableDD: true,
lines: false,
loader: new Ext.tree.TreeLoader({
applyLoader: false
}),
root: {
children: layerList
},
rootVisible: true
});
But only root and the first node are visible in LayerTree.
The nodes are not expandable. What is missing in this definition? The error message in Firebug shows: this.node.layer.getVisibility is not a function Best regards, Christian |
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
