Yes the other functions are working. Based on Andreas's advice I added  
enableDD: true to each LayerContainer control and now the individual layers in 
each group will actually work with moving them and changing the order, however 
the actual groups of layers themselves do not do anything if I move them 
around. My Code looks like this if it helps - I have many LayerContainers 
declared but only one showing here, thanks again for all the help everyone!



     var layerlist_Orthos = new GeoExt.tree.LayerContainer({
        text: 'Ortho Images',
        layerStore: mapPanel.layers,
        leaf: false,
        enableDD: true,
        expanded: false,
        loader:
        {
            filter: function(record)
            {
                var myarr = new Array();
                myarr[0] = record.get("layer").name.indexOf("2010 Ortho Image");
                myarr[1] = record.get("layer").name.indexOf("2006 Ortho Image");
                myarr[2] = record.get("layer").name.indexOf("2004 Ortho Image 
(No Color)");
                myarr[3] = record.get("layer").name.indexOf("2004 Ortho Image 
(Color)");
                myarr[4] = record.get("layer").name.indexOf("2001 Ortho Image");

                if(myarr[0]==-1 && myarr[1]==-1 && myarr[2]==-1 && myarr[3]==-1 
&& myarr[4]==-1)
                {
                return false;
                }
                else
                {
                return true;
                }
            }
            }
        });


        //declare root tree node
        var layerRoot = new Ext.tree.TreeNode({
            text: "All Legend Items",
            expanded: true
            });

       //add children to root node
       layerRoot.appendChild(layerList_Labels)
       layerRoot.appendChild(layerlist_AOI)
       layerRoot.appendChild(layerlist_Trails)
       layerRoot.appendChild(layerlist_Footprints)
       layerRoot.appendChild(layerlist_LegalFabric)
       layerRoot.appendChild(layerlist_ParcelFabric)
       layerRoot.appendChild(layerlist_Base)
       layerRoot.appendChild(layerlist_Orthos)



        var layerTree = new Ext.tree.TreePanel({
        title: '',
        renderTo: 'legend',
        root: layerRoot,
        enableDD: true,
        applyLoader: true,
        rootVisible: false
        });

}

Andrew Stewart
Production Support Analyst
I.T. Services
City of Red Deer
(403) 342-8264
[email protected]<mailto:[email protected]>



________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of 
Ryan Williams
Sent: September 01, 2010 3:12 PM
To: [email protected]
Subject: Re: [Users] TreePanel control doesn't seem to be updating layers when 
I move them

Do the other functions work, like turning layers on and off?
I don't recall doing anything special to make the drag and drop work and it 
looks like you have it enabled.
Have you checked for javscript errors?

On 9/1/2010 3:43 PM, Andrew Stewart wrote:

 I am trying to make my TreePanel / LayerContainers actually move the 
openlayers around when I move them in either their specific groups or in the 
groups themselves. I have tried experimenting by moving layers up and down 
(using drag and drop) but it does not seem to have any effect. Am I missing 
some extra code to make this possible? Thanks for advice.



 //declare root tree node

var layerRoot = new Ext.tree.TreeNode({

text: "All Legend Items",

expanded: true

});

//add children to root node

layerRoot.appendChild(layerList_Labels)

layerRoot.appendChild(layerlist_AOI)

layerRoot.appendChild(layerlist_Trails)

layerRoot.appendChild(layerlist_Footprints)

layerRoot.appendChild(layerlist_LegalFabric)

layerRoot.appendChild(layerlist_ParcelFabric)

layerRoot.appendChild(layerlist_Base)

layerRoot.appendChild(layerlist_Orthos)

var layerTree = new Ext.tree.TreePanel({

title: '',

renderTo: 'legend',

root: layerRoot,

enableDD: true,

applyLoader: true,

rootVisible: false

});

________________________________
This e-mail is intended for the original recipient(s) only. If you have 
received it in error, please advise the sender and delete this message.


_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://www.geoext.org/cgi-bin/mailman/listinfo/users



--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
Monticello, IL
www.paqinteractive.com<http://www.paqinteractive.com>

________________________________
[This message has been scanned for security content threats and viruses.]

[The City of Red Deer I.T. Services asks that you please consider the 
environment before printing this e-mail.]



_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to