[Users] GeoExt: Layer grouping

Andreas Hocevar ahocevar at opengeo.org
Wed Oct 7 20:57:57 CEST 2009


Hi,

the mailing list to write to is users at geoext.org. I cc'd the list.

Regarding your question: you can create layer nodes
(Ext.tree.(Async)TreeNode) to act as container for your layer nodes, and
add layer nodes manually.

Something like this:

var tree = new GeoExt.tree.TreePanel({
  root: new GeoExt.tree.AsyncTreeNode({
    text: "Root",
    applyLoader: false,
    children: [new GeoExt.tree.TreeNode(
       text: "my group",
       children: [
         new GeoExt.tree.LayerNode({...}),
         new GeoExt.tree.LayerNode({...})
       ]
    )]
  });
  /*...*/
});

Look at the documentation for Ext.tree.TreePanel and Ext.tree.TreeNode
for more detail.

Regards,
Andreas.

Casper Børgesen wrote:
> Hi Andreas.
>  
> This is probably not the right way to contact the community behind
> GeoExt, but your name popped up when looking for information - so I
> hope you don't mind.
>  
> I'm currently working with controlling layers in a MapPanel using the
> Tree functionality of GeoExt. But I cannot find any information
> regarding grouping of the different layers. By grouping I mean
> distributing the different (overlay/base) layers into various groups
> (Nature, Traffic, Buildings...). Is this possible using GeoExt?
>  
> I found some information regarding this with OpenLayers, but it seems
> like they don't want to manage this, and thus I'm looking for support
> in the GeoExt community. I see that MapFish supports layer grouping.
>  
> If there is a mailing list or forum or similar, please feel free to
> direct me :)
>  
>  
> Kind Regards
>  
> Casper Børgesen


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list