[Users] LayerContainer in TreePanel

Eric Lemoine eric.lemoine at camptocamp.com
Tue Mar 2 08:19:13 CET 2010


On Monday, March 1, 2010, Julien-Samuel Lacroix <jlacroix at mapgears.com> wrote:
> Hi,
>
> I was looking at the Layer Tree Tutorial [1] and wondered if it's
> possible to add multiple LayerContainer to a single TreePanel.
>
> For example, how do I build a Tree with the two following LayerContainer:
>
> var layerListTasmania = new GeoExt.tree.LayerContainer({
>      text: 'Tasmania Layers',
>      layerStore: mapPanel.layers,
>      leaf: false,
>      expanded: true,
>      loader: {
>          filter: function(record) {
>              return record.get("layer").name.indexOf("Tasmania") !== -1
>          }
>      }
> });
>
> var layerListUS = new GeoExt.tree.LayerContainer({
>      text: 'Tasmania Layers',
>      layerStore: mapPanel.layers,
>      leaf: false,
>      expanded: true,
>      loader: {
>          filter: function(record) {
>              return record.get("layer").name.indexOf("US") !== -1
>          }
>      }
> });


Hi Julien. I think it should work. Do you have trouble making it work?

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list