[Users] Order of items in GeoExt.LayerContainer

Andreas Hocevar ahocevar at opengeo.org
Wed Nov 17 09:11:28 CET 2010


Hi,

when using a LayerLoader, the ordering of layers is determined by the order they are added to the map. If you want a different order in the tree, you should create layer nodes manually rather than using a loader.

Regards,
Andreas.

On Nov 17, 2010, at 00:10 , Andrew Stewart wrote:

> I am having a problem with the ordering of items being loaded into my GeoExt.LayerContainer and added to a layertree. Not sure why but with the below code the layer DA Label is always added on top of everything else even though I clearly have defined it in between everything. Does the ordering of layers depend on something else entirely? I am even adding the layer last to my map but it still doesn’t have any affect, appreciate any assistance.
>  
>    loader:
>         {
>             filter: function(record)
>             {
>                 if (record.data.title == 'Neighbourhood Label' || record.data.title == 'Overview Streets' || record.data.title == 'Quadrant Streets' || record.data.title == 'Neighbourhood Streets' || record.data.title == 'Block Streets' || record.data.title == 'Proposed Streets' || record.data.title == 'DA Label' || record.data.title == 'Address Label (Overview)' || record.data.title == 'Address Label (Detail)')
>                     return true;
>             }
>             }
>         });
>  
>  
>  
> 
> This e-mail is intended for the original recipient(s) only. If you have received it in error, please advise the sender and delete this message.
> 
> _______________________________________________
> 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