<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18939"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><SPAN class=943382721-01092010><FONT size=2
face=Arial>Yes the other functions are working. Based on Andreas's advice I
added </FONT><FONT size=2><FONT face=Arial><STRONG>enableDD:
</STRONG></FONT><FONT face=Arial><STRONG>tr<SPAN
class=943382721-01092010>u</SPAN>e </STRONG>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!</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=943382721-01092010><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face=Arial> var
layerlist_Orthos = new
GeoExt.tree.LayerContainer({<BR> text:
'Ortho Images',<BR> layerStore:
mapPanel.layers,<BR> leaf:
false,<BR> enableDD:
true,<BR> expanded:
false,<BR> loader:
<BR>
{<BR> filter:
function(record)
<BR>
{<BR>
var myarr = new
Array();<BR>
myarr[0] = record.get("layer").name.indexOf("2010 Ortho
Image");<BR>
myarr[1] = record.get("layer").name.indexOf("2006 Ortho
Image");<BR>
myarr[2] = record.get("layer").name.indexOf("2004 Ortho Image (No
Color)");<BR>
myarr[3] = record.get("layer").name.indexOf("2004 Ortho Image
(Color)");<BR>
myarr[4] = record.get("layer").name.indexOf("2001 Ortho Image");</FONT></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#0000ff size=2
face=Arial>
if(myarr[0]==-1 && myarr[1]==-1 && myarr[2]==-1 &&
myarr[3]==-1 &&
myarr[4]==-1)<BR>
{<BR>
return
false;<BR>
}<BR>
else<BR>
{<BR>
return
true;<BR>
}<BR>
}<BR>
}<BR>
});<BR> <BR> <BR>
//declare root tree node<BR> var
layerRoot = new
Ext.tree.TreeNode({<BR>
text: "All Legend
Items",<BR>
expanded:
true<BR>
});<BR>
<BR> //add children to root
node<BR>
layerRoot.appendChild(layerList_Labels)<BR>
layerRoot.appendChild(layerlist_AOI)<BR>
layerRoot.appendChild(layerlist_Trails)<BR>
layerRoot.appendChild(layerlist_Footprints)<BR>
layerRoot.appendChild(layerlist_LegalFabric)<BR>
layerRoot.appendChild(layerlist_ParcelFabric)<BR>
layerRoot.appendChild(layerlist_Base)<BR>
layerRoot.appendChild(layerlist_Orthos)<BR> <BR>
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff size=2
face=Arial> var layerTree = new
Ext.tree.TreePanel({<BR> title:
'',<BR> renderTo:
'legend',<BR> root:
layerRoot,<BR> enableDD:
true,<BR> applyLoader:
true,<BR> rootVisible:
false<BR>
});<BR> <BR>}</FONT></DIV><!-- Converted from text/rtf format -->
<P><FONT color=#000080 size=2 face=Verdana>Andrew Stewart</FONT> <BR><FONT
size=2 face=Verdana>Production Support Analyst<BR>I.T. Services<BR>City of Red
Deer</FONT> <BR><FONT size=2 face=Verdana>(403) 342-8264</FONT> <BR><U></U><A
href="mailto:andrew.stewart@reddeer.ca"><U></U><U><FONT color=#0000ff size=2
face=Verdana>andrew.stewart@reddeer.ca</FONT></U><U></U></A><U></U><BR></P>
<DIV> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> users-bounces@geoext.org
[mailto:users-bounces@geoext.org] <B>On Behalf Of </B>Ryan
Williams<BR><B>Sent:</B> September 01, 2010 3:12 PM<BR><B>To:</B>
users@geoext.org<BR><B>Subject:</B> Re: [Users] TreePanel control doesn't seem
to be updating layers when I move them<BR></FONT><BR></DIV>
<DIV></DIV>Do the other functions work, like turning layers on and off? <BR>I
don't recall doing anything special to make the drag and drop work and it looks
like you have it enabled.<BR>Have you checked for javscript errors? <BR><BR>On
9/1/2010 3:43 PM, Andrew Stewart wrote:
<BLOCKQUOTE cite=mid:94816848A8EB3941B1E8592F425827A96845C804AF@chex2.crdnet.ca
type="cite">
<META name=GENERATOR content="MSHTML 8.00.6001.18939">
<DIV>
<P><FONT color=#008000><FONT color=#008000><FONT size=2><SPAN
class=869554120-01092010><FONT color=#0000ff face=Arial> 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.</FONT></SPAN></FONT></FONT></FONT></P>
<P><FONT color=#008000><FONT color=#008000><FONT size=2><SPAN
class=869554120-01092010></SPAN></FONT></FONT></FONT> </P>
<P><FONT color=#008000><FONT color=#008000><FONT size=2><SPAN
class=869554120-01092010> </SPAN>//declare root tree
node</FONT></FONT></FONT></P><FONT size=2></FONT>
<P><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>var</FONT></FONT><FONT size=2> layerRoot = </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2>
Ext.tree.TreeNode({</FONT></P>
<P><FONT size=2>text: </FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"All Legend Items"</FONT></FONT><FONT size=2>,</FONT></P>
<P><FONT size=2>expanded: </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>true</FONT></FONT></P><FONT size=2></FONT>
<P><FONT size=2>});</FONT></P>
<P><FONT color=#008000 size=2><FONT color=#008000 size=2>//add children to
root node</FONT></FONT></P><FONT size=2></FONT>
<P><FONT size=2>layerRoot.appendChild(layerList_Labels)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_AOI)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_Trails)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_Footprints)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_LegalFabric)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_ParcelFabric)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_Base)</FONT></P>
<P><FONT size=2>layerRoot.appendChild(layerlist_Orthos)</FONT></P>
<P><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>var</FONT></FONT><FONT size=2> layerTree = </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2>
Ext.tree.TreePanel({</FONT></P>
<P><FONT size=2>title: </FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>''</FONT></FONT><FONT size=2>,</FONT></P>
<P><FONT size=2>renderTo: </FONT><FONT color=#a31515 size=2><FONT
color=#a31515 size=2>'legend'</FONT></FONT><FONT size=2>,</FONT></P>
<P><FONT size=2>root: layerRoot,</FONT></P>
<P><FONT size=2>enableDD: </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>true</FONT></FONT><FONT size=2>,</FONT></P>
<P><FONT size=2>applyLoader: </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>true</FONT></FONT><FONT size=2>,</FONT></P>
<P><FONT size=2>rootVisible: </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>false</FONT></FONT></P><FONT size=2>
<P>});</P></FONT></DIV>
<DIV>
<HR>
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. </DIV><PRE wrap=""><FIELDSET class=mimeAttachmentHeader></FIELDSET>
_______________________________________________
Users mailing list
<A class=moz-txt-link-abbreviated href="mailto:Users@geoext.org">Users@geoext.org</A>
<A class=moz-txt-link-freetext href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</A>
</PRE></BLOCKQUOTE><BR><PRE class=moz-signature cols="72">--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
Monticello, IL
<A class=moz-txt-link-abbreviated href="http://www.paqinteractive.com">www.paqinteractive.com</A></PRE>
<DIV>
<P>
<HR>
[This message has been scanned for security content threats and
viruses.]<BR><BR>[The City of Red Deer I.T. Services asks that you please
consider the environment before printing this e-mail.]<BR>
<P></P></DIV>
<DIV><P><HR>
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.
</P></DIV>
</BODY></HTML>