[Users] Layer Tree Layers not rendered in store order
Adam Ratcliffe
adam at prema.co.nz
Fri May 14 12:51:18 CEST 2010
Thanks for that, I hadn't thought of it that way before.
Cheers
Adam
On 14/05/2010, at 7:34 PM, Andreas Hocevar wrote:
> 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
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
More information about the Users
mailing list