0

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.

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.