[Users] layerTree EnableDD

Arnaud Vandecasteele arnaud.sig at gmail.com
Fri Aug 7 15:10:13 CEST 2009


Hi all,

I'm trying to understand the way that the EXT Tree works with the GeoExt
elements and particulary the enableDD config.

1/ When my config tree is that one, with both  gx_baselayercontainer and
gx_overlaylayercontainer the enableDD works :

    var treeConfig = new OpenLayers.Format.JSON().write([
        {
            nodeType    : 'gx_baselayercontainer'
            ,expanded   : true
            ,allowDrag  : false
            ,allowDrop  : false
            ,draggable  : false
            ,icon       : './img/map.png'
        },{
            nodeType    : 'gx_overlaylayercontainer'
            ,expanded   : true
            ,icon       : './img/map.png'
        }
    ], true);

For only one layer (this one is associated with a FeatureStore and a
GridPanel) nothing happen when i drag it. Is it normal?

2/ But when I trie to configure my tree layer by layer (gx_layer) the
enableDD doesn't seems to work

    var treeConfig = new OpenLayers.Format.JSON().write([
        {
            nodeType    : 'gx_baselayercontainer'
            ,expanded   : true
            ,allowDrag  : false
            ,allowDrop  : false
            ,draggable  : false
            ,icon       : './img/map.png'
        },,{
            text        : 'Overlays'
            ,draggable  : false
            ,expanded   : true
            ,icon       : './img/maps-stack.png'
            ,children: [
                {
                    nodeType    : 'gx_layer'
                    ,layer      : 'city'
                    ,icon       : './img/city-16x16.png'
                },{
                    nodeType    : 'gx_layer'
                    ,layer      : 'moutains'
                    ,icon       : './img/Mountain-16x16.png'
                },{
                    nodeType    : 'gx_layer'
                    ,layer      : 'vmap'
                    ,icon       : './img/Mountain-16x16.png'
                }
            ]
        }
    ], true);

Could you help me to understand the way it works.


Best regards


Arnaud



-- 
--------------------------------------------------------------------
Van De Casteele Arnaud
72 Rue de la colline des camélias 97400 Saint-Denis
0262 30 67 79 - 0692 76 24 48
SIG - WebMapping - GPS embarqué
Site internet : http://geotribu.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20090807/99b95b70/attachment.htm 


More information about the Users mailing list