<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Francecso,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I greatly appreciate your help and the LayerFolderNode code.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I certainly could be wrong, but it seems that is still be a need for a LayerFolderLoader class, similar to the LayerParamLoader in v 1.1. I am trying to code an equivalent class, but please let me know if there is a simpler way to load/add/create the folder nodes from the group layer. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you again,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dave<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Francesco D'Alesio [mailto:francesco.dalesio@r3-gis.com] <br><b>Sent:</b> Wednesday, February 20, 2013 7:18 AM<br><b>To:</b> Dave Kliphon<br><b>Cc:</b> users@geoext.org<br><b>Subject:</b> RE: RE: [Users] GeoExt2 Sublayer Example?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Hello Dave,<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>I'm sorry, I misunderstood your initial question.<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>I'm dealing with a layers container, so I built a plugin for a layergroup node that holds OpenLayers.Layer instances.<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>I'm not using the "layers" param of OpenLayers.Layer as in LayerParamLoader<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>However, here's the code<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>/**<br>* The LayerFolder plugin. This is used to create a node that holds multiple layers, keeping checkboxes syncd<br>* {plugins: ['gx_layerfolder'], ...}<br>*<br>*/<br>Ext.define('GeoExt.tree.LayerFolderNode', {<br>extend: 'Ext.AbstractPlugin',<br>alias: 'plugin.gx_layerfolder',<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>init: function(target) {<br>var me = this,<br>checked = true,<br>layer;<br><br>target.eachChild(function(node) {<br>layer = node.get('layer');<br>if(!layer.getVisibility()) checked = false;<br>layer.events.on({<br>'visibilitychanged' : me.onChildLayerVisibilityChanged,<br>scope: me<br>});<br>});<br>target.set('checked', checked);<br><br>target.on('afteredit', function(node, modifiedFields) {<br>if(~Ext.Array.indexOf(modifiedFields, 'checked')) {<br>me.onCheckChange();<br>}<br>});<br><br>me.target = target;<br>},<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>/**<br>* @private<br>* Updates the visibility of the child layers<br>* node.<br>*/<br>onCheckChange: function() {<br>var node = this.target,<br>checked = this.target.get('checked');<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>if(!node._visibilityChanging) return;<br><br>node._visibilityChanging = true;<br>node.eachChild(function(node) {<br>node.get('layer').setVisibility(checked);<br>});<br>delete node._visibilityChanging;<br>},<br><br>/**<br>* @private<br>* Updates the visibility this node, when children visibility changes<br>*<br>*/<br>onChildLayerVisibilityChanged: function() {<br>var node = this.target;<br><br>if(!node._visibilityChanging) return;<br><br>var checked = true;<br>node.eachChild(function(childNode) {<br>if(!childNode.get('layer').getVisibility()) checked = false;<br>});<br>node._visibilityChanging = true;<br>node.set('checked', checked);<br>delete node._visibilityChanging;<br>}<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'> <o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>});<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Francesco<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>-------Dave Kliphon <<a href="mailto:davek@SCA-CORP.COM">davek@SCA-CORP.COM</a>> wrote--------<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Subject: RE: [Users] GeoExt2 Sublayer Example?<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Date: 19.02.2013 21:39<o:p></o:p></span></p><p><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p><blockquote style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:7.5pt;margin-right:0in'><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Francesco,</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>It seems that we would need to develop both layer node group and group loader classes, similar to the LayerParamNode and LayerParamLoader scripts in v1.1. Pass along any code examples if you have them, otherwise we will follow your lead in developing this custom sub-layer capability.</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Do you or does anyone know if the sub-layer feature will ultimately be revived in GeoExt2, and is there a GeoExt2 release date?</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Thanks for your help,</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Dave</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><strong><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></strong><span style='color:black'> </span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Francesco D'Alesio [<a href="mailto:francesco.dalesio@r3-gis.com">mailto:francesco.dalesio@r3-gis.com</a>]<br><strong><span style='font-family:"Tahoma","sans-serif"'>Sent:</span></strong> Tuesday, February 19, 2013 2:00 AM<br><strong><span style='font-family:"Tahoma","sans-serif"'>To:</span></strong> Dave Kliphon<br><strong><span style='font-family:"Tahoma","sans-serif"'>Cc:</span></strong> <a href="mailto:users@geoext.org">users@geoext.org</a><br><strong><span style='font-family:"Tahoma","sans-serif"'>Subject:</span></strong> Re: [Users] GeoExt2 Sublayer Example?</span><span style='color:black'><o:p></o:p></span></p></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'> <o:p></o:p></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>Hello Dave,<br>I've defined a layegroup plugin, similar to GeoExt.tree.LayerNode , that simply get "checked" from children and pass the "check change" event to children.<br><br><br>Francesco<br><br><br>Il 18/02/2013 22:59, Dave Kliphon ha scritto:<o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>Does anyone have an example of sublayer creation in GeoExt2? It appears that examples/tree/tree.js is incomplete in this respect (the Tasmanian Group Layer is a single tier, unlike in 1.1).<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>If there are no examples, is there a timeframe for release, or advice on developing a temporary solution?<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>Thanks!<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>Dave<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span style='color:black'><br><br><o:p></o:p></span></p><pre><span style='color:black'><o:p> </o:p></span></pre><pre><span style='color:black'>_______________________________________________<o:p></o:p></span></pre><pre><span style='color:black'><o:p> </o:p></span></pre><pre><span style='color:black'>Users mailing list<o:p></o:p></span></pre><pre><span style='color:black'><o:p> </o:p></span></pre><pre><span style='color:black'><a href="mailto:Users@geoext.org">Users@geoext.org</a><o:p></o:p></span></pre><pre><span style='color:black'><o:p> </o:p></span></pre><pre><span style='color:black'><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></pre></blockquote><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span style='color:black'> <o:p></o:p></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>--<o:p></o:p></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'> <o:p></o:p></span></p></div></div></div></blockquote></div></body></html>