I’m creating an application using OpenGeo Suite SDK and I need to create a two level layer manager. I can create the first layer tree with the "gxp_layermanager" using the following code in the suite-sdk:
{
ptype: "gxp_layermanager",
groups: {
"default": "Capas",
"MGN":{
title:"Marco Geoestadístico Nacional"
},
"TelCom":{
title:"Vías de comunicación"
},
"background": {
title: "Mapa base",
exclusive: true
}
},
outputConfig: {
id: "tree",
border: true,
tbar: []
},
outputTarget: "westpanel"
},
That will put the layers in groups but what I need is to create subgroups or children nodes, pretty much like the left panel here.
Answer
This is not supported by the framework, you will need to write your own plugin to handle this. See the following code for an example:
https://github.com/boundlessgeo/Tridex/blob/master/app/static/script/app/Tridex/NestedLayerTree.js
and here for an example of the config to use:
https://github.com/boundlessgeo/Tridex/blob/master/app/skins/government.html#L4:L22
No comments:
Post a Comment