Hello,<br><br>I have the same problem. Did you find a solution?<br><br>Thank you<br><br>L.Z<br><br><div class="gmail_quote">2012/3/5 Robert Buckley <span dir="ltr">&lt;<a href="mailto:robertdbuckley@yahoo.com" target="_blank">robertdbuckley@yahoo.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
Hi,</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">I have a mappping project which uses the Ext.TreePanel to configure the layers as displayed underneath. I would like to be able to move the layers around (which is possible using enableDD: true) but in my case the</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:10pt">drawing order doesn´t change. I.e when I move a layer upwards the drawing order (z-index) stays the same.</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">What should I do to change the drawing order of
 the layers in the map when I change the order in the tree?</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Thanks for any tips,</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Rob</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br>
</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">First the layers definitions are defined...e.g</div><div><div><font face="arial, helvetica, sans-serif">  </font></div><div><font face="arial, helvetica, sans-serif">var layer_zgb_grenze = new OpenLayers.Layer.WMS(&quot;Verwaltungsgrenzen: Planungsraum / Landkreis&quot;, &quot;/geoserver/gwc/service/wms&quot;, {</font></div>
<div><font face="arial, helvetica, sans-serif">        layers: &#39;LK_Grenzen_gwc&#39;,</font></div><div><font face="arial, helvetica, sans-serif">        format: &#39;image/png&#39;,</font></div><div><font face="arial, helvetica, sans-serif">        transparent: true,</font></div>
<div><font face="arial, helvetica, sans-serif">        singleTile: true</font></div><div><font face="arial, helvetica, sans-serif">    }, {</font></div><div><font face="arial, helvetica, sans-serif">        &#39;buffer&#39;: 0,</font></div>
<div><font face="arial, helvetica, sans-serif">   
     &#39;opacity&#39;: 1,</font></div><div><font face="arial, helvetica, sans-serif">        &#39;isBaseLayer&#39;: false,</font></div><div><font face="arial, helvetica, sans-serif">        visibility: true</font></div>
<div><font face="arial, helvetica, sans-serif">    });</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">...etc</font></div><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><font face="arial, helvetica, sans-serif">then I put the layers into an array so I can check their initial drawing order in the map (ps I have around 100 layers so this way it´s easier to see)</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">e.g..</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>// layers added first are at the bottom of the z-index</font></div>
<div><span style="font-family:arial,helvetica,sans-serif;font-size:small"><br></span></div><div><font face="arial, helvetica, sans-serif"><div>       </div><div>    var grenzen_layers = [];</div><div>    grenzen_layers.push(Layer_grenzen_sg,Layer_grenzen_mg,layer_zgb_grenze);</div>
<div>    map.addLayers(grenzen_layers); </div></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">then the layers are put into the tree using the following....</font></div>
<div><font face="arial, helvetica,
 sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">// create tree structure</font></div><div><font style="font-family:arial,helvetica,sans-serif;font-size:13px"><div>var treeConfig = [</div><div>
         {</div><div>       nodeType: &quot;gx_baselayercontainer&quot;,</div><div>       text: &quot;Basiskarten&quot;,</div><div><span style="white-space:pre-wrap">        </span>   expanded: true,<span style="white-space:pre-wrap">        </span></div>
<div><span style="white-space:pre-wrap">        </span>   hidden:true,   </div><div>       leaf: true,</div><div><span style="white-space:pre-wrap">        </span>   loader: {</div><div><span style="white-space:pre-wrap">        </span>   <span style="white-space:pre-wrap">        </span>param:
 &quot;LAYERS&quot;</div><div><span style="white-space:pre-wrap">                        </span>   }</div><div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">                </span>{</div><div><span style="white-space:pre-wrap">                </span>text: &quot;DOP&quot;,</div>
<div><span style="white-space:pre-wrap">                </span>expanded: true,</div><div><span style="white-space:pre-wrap">                </span>children: [</div><div><span style="white-space:pre-wrap">                </span>        {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> text:&#39;DOP&#39;,</div><div><span style="white-space:pre-wrap">                </span>             layer: dop,</div><div><span style="white-space:pre-wrap">                </span>         //  <span style="white-space:pre-wrap">        </span> icon: &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Grenzen_SG_gen" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Grenzen_SG_gen</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                </span>           qtip: &quot;DOP&quot;</div><div><span style="white-space:pre-wrap">                </span>         }]</div><div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">                </span>{</div>
<div><span style="white-space:pre-wrap">                </span>text: &quot;Verwaltungsgrenzen&quot;,</div><div><span style="white-space:pre-wrap">                </span>expanded: true,</div><div><span style="white-space:pre-wrap">                </span>children: [</div>
<div><span style="white-space:pre-wrap">                </span>        {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div><div><span style="white-space:pre-wrap">                                        </span> text:&#39;Planungsraum / Landkreis Grenze&#39;,</div>
<div><span style="white-space:pre-wrap">                </span>             layer: layer_zgb_grenze,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon: &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V1_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V1_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">                </span>
         },</div><div><span style="white-space:pre-wrap">                                </span> {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div><div><span style="white-space:pre-wrap">                                        </span> text:&#39;Samtgemeinde Grenze&#39;,</div>
<div><span style="white-space:pre-wrap">                </span>             layer: Layer_grenzen_sg,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon: &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V2_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V2_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">        
        </span>         },</div><div><span style="white-space:pre-wrap">                                </span> {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div><div><span style="white-space:pre-wrap">                                        </span> text:&#39;Mitgliedsgemeinde Grenze&#39;,</div>
<div><span style="white-space:pre-wrap">                </span>             layer: Layer_grenzen_mg,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon: &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V3_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V3_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">                </span>         }]</div><div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">                </span>{</div>
<div><span style="white-space:pre-wrap">                </span>text: &quot;LROP / RROP&quot;,</div><div><span style="white-space:pre-wrap">                </span>expanded: true,<span style="white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap">                </span>children: [</div>
<div><span style="white-space:pre-wrap">                </span>        {</div><div><span style="white-space:pre-wrap">                </span>             text: &quot;LROP&quot;, //,layer_RROP</div><div><span style="white-space:pre-wrap">                                        </span> expanded: true,<span style="white-space:pre-wrap">                                        </span> </div>
<div><span style="white-space:pre-wrap">                </span>             children: [</div><div><span style="white-space:pre-wrap">                                        </span>        {</div><div><span style="white-space:pre-wrap">                                        </span>             nodeType: &#39;gx_layer&#39;,</div>
<div><span style="white-space:pre-wrap">                                                                </span> text:&#39;LROP&#39;,</div><div><span style="white-space:pre-wrap">                                        </span>             layer: layer_LROP,</div><div><span style="white-space:pre-wrap">                                        </span>          // <span style="white-space:pre-wrap">        </span> icon: &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=wea_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=wea_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                
        </span> qtip: &quot;LROP&quot;</div><div><span style="white-space:pre-wrap">                                        </span>         }]</div><div><span style="white-space:pre-wrap">                                </span>}</div><div><span style="white-space:pre-wrap">                </span>         ]<span style="white-space:pre-wrap">                                </span> </div>
<div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">                </span>{</div><div><span style="white-space:pre-wrap">                </span>text: &quot;DGM&quot;,</div><div><span style="white-space:pre-wrap">                </span>expanded: true,</div>
<div><span style="white-space:pre-wrap">                </span>children: [</div><div><span style="white-space:pre-wrap">                </span>        {</div><div><span style="white-space:pre-wrap">                </span>  
           nodeType: &#39;gx_layer&#39;,</div><div><span style="white-space:pre-wrap">                                        </span> text:&#39;DGM&#39;,</div><div><span style="white-space:pre-wrap">                </span>             layer: layer_dgm,</div><div><span style="white-space:pre-wrap">                </span>          // <span style="white-space:pre-wrap">        </span> icon: &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Vorrangstandorte_WEA_RROP08_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Vorrangstandorte_WEA_RROP08_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;DGM&quot;</div><div><span style="white-space:pre-wrap">                </span>         }]</div><div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">        
        </span>{</div><div><span style="white-space:pre-wrap">                </span>text: &quot;Suchräume&quot;,</div><div><span style="white-space:pre-wrap">                </span>expanded: true,</div><div><span style="white-space:pre-wrap">                </span>children: [</div>
<div><span style="white-space:pre-wrap">                </span>        {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div><div><span style="white-space:pre-wrap">                                        </span> text:&#39;layer_suchraumV1&#39;,</div>
<div><span style="white-space:pre-wrap">                </span>             layer: layer_dgm,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon:
 &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V1_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V1_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">                </span>         },</div><div><span style="white-space:pre-wrap">                                </span> {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> text:&#39;layer_suchraumV2&#39;,</div><div><span style="white-space:pre-wrap">                </span>             layer: layer_dgm,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon:
 &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V2_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V2_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">                </span>         },</div><div><span style="white-space:pre-wrap">                                </span> {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> text:&#39;layer_suchraumV3&#39;,</div><div><span style="white-space:pre-wrap">                </span>             layer: layer_dgm,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon:
 &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V3_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V3_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">                </span>         },</div><div><span style="white-space:pre-wrap">                                </span> {</div><div><span style="white-space:pre-wrap">                </span>             nodeType: &#39;gx_layer&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> text:&#39;layer_suchraumV4&#39;,</div><div><span style="white-space:pre-wrap">                </span>             layer: layer_dgm,</div><div><span style="white-space:pre-wrap">                </span>           <span style="white-space:pre-wrap">        </span>// icon:
 &#39;<a href="http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V4_wgs84" target="_blank">http://maps.zgb.de/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=16&amp;LAYER=Suchraum_V4_wgs84</a>&#39;,</div>
<div><span style="white-space:pre-wrap">                                        </span> qtip: &quot;Metadata&quot;</div><div><span style="white-space:pre-wrap">                </span>         }]</div><div><span style="white-space:pre-wrap">                </span>}</div><div><br></div>
<div>   ];</div><div><br></div><div><span style="white-space:pre-wrap">        </span></div><div>// create TreePanel</div><div><span style="white-space:pre-wrap">        </span></div><div>var layerTree = new Ext.tree.TreePanel({</div><div>
    text: &quot;Karteninhalt&quot;,</div><div>    border: true,</div><div>    region: &quot;west&quot;,</div><div>    animate: true,</div><div>    height: 500,</div><div>    width: 350,</div><div>    enableDD:
 true,</div><div>    split: true,</div><div>    autoScroll: true,</div><div>    containerScroll: true,</div><div>    xtype: &quot;gx_legendpanel&quot;,</div><div>    showWmsLegend: true,</div><div>    loader: new Ext.tree.TreeLoader({</div>
<div><span style="white-space:pre-wrap">                </span>    applyLoader: false,</div><div><span style="white-space:pre-wrap">                </span>        uiProviders: {</div><div><span style="white-space:pre-wrap">                </span>                &quot;layernodeui&quot;: LayerNodeUI</div>
<div><span style="white-space:pre-wrap">                                        </span>            }</div><div><span style="white-space:pre-wrap">                                        </span>    }),</div><div><span style="white-space:pre-wrap">                                        </span>    root:
 {</div><div><span style="white-space:pre-wrap">                                        </span>        text: &quot;ZGB GeoPortal&quot;,</div><div><span style="white-space:pre-wrap">                                        </span>        nodeType: &quot;async&quot;,</div><div><span style="white-space:pre-wrap">                                        </span>        children: treeConfig,</div>
<div><span style="white-space:pre-wrap">                                                        </span>expanded: true</div><div><span style="white-space:pre-wrap">                                        </span>    },</div><div><span style="white-space:pre-wrap">                                        </span>    rootVisible: true,</div><div>
<span style="white-space:pre-wrap">                                        </span>    lines: true</div><div><span style="white-space:pre-wrap">                                                </span></div><div><span style="white-space:pre-wrap">                </span>});</div></font></div></div></div></div><br>_______________________________________________<br>

Users mailing list<br>
<a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>