Hi,
this is by design, and it is because of the way you should look at the map. The
first layer you add is on the bottom of the stack, the last one at the top.
If you want to change that, you need to write a LayerLoader, with a customized
addLayerNode method.
Regards,
Andreas.
On May 14, 2010, at 00:16 , Adam Ratcliffe wrote:
> Hi,
>
> I have a layer tree, configured as shown below. I'm adding a base tile layer
> to the map first and then dynamically loading a set of WFS layers and adding
> these to the map. When the layer tree is rendered the base tile layer is at
> the bottom of the tree. Furthermore if I add additional layers to the map
> these layers appear at the top of the tree. I've checked the order of the
> records in the map's layer store and it is correct so there must be something
> going on in the LayerContainer which is changing the layer order.
>
> Any ideas?
>
> Cheers
> Adam
>
> {
> id: 'layers',
> xtype: 'treepanel',
> autoScroll: true,
> animate: true,
> border: false,
> lines: false,
> title: 'Legend',
> region: 'center',
> root: new GeoExt.tree.LayerContainer({
> text: 'Map Layers',
> layerStore: mapPanel.layers,
> leaf: false,
> expanded: true
> }),
> rootVisible: false,
> listeners: {
> 'click': onLayerSelected
> }
> }
> _______________________________________________
> Users mailing list
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users