[Users] Tree Layer question...

Andreas Hocevar ahocevar at opengeo.org
Fri Jul 17 11:02:29 CEST 2009


Hey Paul,

sorry for the delayed reply. The difference between the layer tree 
approach in Mapfish and GeoExt is that the former uses a model on the 
tree level for custom trees, and the latter lets you use the a plain Ext 
configuration for the tree, because you have a choice of different node 
types for representing layers.

The layer tree that you see in 
http://demo.mapfish.org/mapfishsample/1.1/examples/tree/tree_automatic.html 
will be possible in GeoExt, with this configuration:

var tree = new Ext.tree.TreePanel({
    root: new GeoExt.tree.LayerContainer({
        defaults: {
            loader: new GeoExt.tree.LayerParamsLoader({
                param: "LAYERS"
            })
        }
    }),
    ...
});

This does not work yet, but as Eric said, there is work going on to make 
it happen. We are currently switching to loaders, like 
Ext.tree.TreeLoader, for populating LayerContainers (ticket #122). The 
next steps will be:

* Resurrect the LayerParamsNode (known from a previous patch for #22). 
This can do more than just change the layers param on WMS layers. It can 
also be used e.g. to use CQL_FILTER and any arbitrary params that 
OpenLayers layers take in the params object.

* Create a loader that looks up a params name (e.g. LAYERS) as argument 
and will create one subnode for every param it finds. To make this even 
smarter, the loader could process additional information from the 
LayerStore, e.g. titles for the node texts.

Please give feedback if this makes sense for your use case.

Regards,
Andreas.

 james wrote:
> Thank guys...
> And how about a "custom" treeview ? Like 'model' in mapfish...
>
> Paul
>
> On Mon, Jul 13, 2009 at 12:56 PM, Eric Lemoine 
> <eric.lemoine at camptocamp.com <mailto:eric.lemoine at camptocamp.com>> wrote:
>
>     On Monday, July 13, 2009, Paul james <pauljame at gmail.com
>     <mailto:pauljame at gmail.com>> wrote:
>     > Hello Guys...
>     >
>     > Using Mapfish with Mapserver layer, my treeview can turn on/off
>     layers individually...
>     > Example :
>     http://demo.mapfish.org/mapfishsample/1.1/examples/tree/tree_automatic.html
>     > Example, I can turn parkings and summits, but just 1 layer is
>     generated with both...
>     >
>     > Is it posible to do that using only GeoExt?
>
>     turning on and off sublayers (i.e. layers in a Layer.WMS instance)
>     isn't supported by GeoExt.tree at that time. But some work has been
>     started... Maybe Andreas can say more about this work.
>
>     Cheers,
>
>     >
>     > Paul
>     >
>     >
>
>     --
>     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
>     <mailto:eric.lemoine at camptocamp.com>
>     http://www.camptocamp.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>   


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



More information about the Users mailing list