[Users] Tree Layer question...

Eric Lemoine eric.lemoine at camptocamp.com
Wed Jul 22 07:08:31 CEST 2009


On Monday, July 20, 2009, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> Paul james wrote:
>> Hi Andreas...
>>
>> In my case I need :
>>  - Possibility to create a custom treeview (like model in mapfish)
>
> Is already possible (using just an Ext.TreePanel configuration, with
> GeoExt node types).

Right.

Where you specified a user model in the MapFish tree (with the "model"
property) you'd use LayerNode's (in a regular Ext tree panel) with
GeoExt. And where you used the automatic model in the MapFish tree
you'd use  LayerContainer with GeoExt.

Cheers,

>
>>  - Supporting sublayer (Layer.Mapserver), like Mapfish does
>
> Will be possible, by managing anything that is expressed as URL param
> with LayerParamsNode and LayerParamsLoader.
>
>>  - Possibility to add a Radio button in some nodes (with Checkbox)
>
> Is already possible, see the tree.html example.
>
>>  - Possibility to takeoff all icons (mapfish stay with a ugly white
>> space when I dont use a icon)
>
> Is already possible, with the following css:
> .x-tree-node-icon {
>     width: 0px;
> }
>
> Regards,
> Andreas.
>
>>
>> Thanks
>>
>> Paul
>>
>> On Fri, Jul 17, 2009 at 6:02 AM, Andreas Hocevar <ahocevar at opengeo.org
>> <mailto:ahocevar at opengeo.org>> wrote:
>>
>>     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>
>>         <mailto: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>
>>            <mailto: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>
>>            <mailto:eric.lemoine at camptocamp.com
>>         <mailto:eric.lemoine at camptocamp.com>>
>>            http://www.camptocamp.com
>>
>>
>>         ------------------------------------------------------------------------
>>
>>         _______________________________________________
>>         Users mailing list
>>         Users at geoext.org <mailto: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.
>>
>>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
>


-- 
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