[Users] Layertreebuilder has issues when layer removed.

Matt Priour mpriour at kestrelcomputer.com
Fri Jul 15 05:17:56 CEST 2011


Well technically, since the layer is removed via user interaction with the tree, then I find the layer associated with the node, remove it, and then remove the node and remove empty parents. In my project this is all custom code and not part of GeoExt. However, if your using the layertreebuilder user extension and it is removing the layer and node for you and you want to run the remove empty parents logic, then you can run that on the treepanel’s ‘remove’ event.

Matt Priour
Kestrel Computer Consulting

From: Phil Scadden 
Sent: Thursday, July 14, 2011 4:35 PM
Cc: users at geoext.org 
Subject: Re: [Users] Layertreebuilder has issues when layer removed.



  You’re right. I wasn’t paying much attention to the actual removal logic there. I was mostly trying to demonstrate the use of cascade and/or eachChild. I used something like that in a project were there were all leaf nodes were always part of a group node.
Just to clarify here. This is in your main code, not in added to Geoext somewhere. So when you remove a layer in your main code (I go mapPanel.map.layers[i].destroy() to remove), you are locating the associated node in the layertree and then executing your code?

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.





--------------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110714/7bfa3dc8/attachment.htm 


More information about the Users mailing list