[Users] Order of items in GeoExt.LayerContainer
Andrew Stewart
Andrew.Stewart at reddeer.ca
Wed Nov 17 16:53:29 CET 2010
Thanks for the response.. I realized the problem wasn't with my loader but actually with my mapPanel. I was removing layers from my map and re-adding them (sometimes in a different order) however I wasn't refreshing my mappanel to the new map so the layer order was still the old one. When I refreshed the map panel before using the layerlist/layertree everything works great now. Thanks for the advice.
-----Original Message-----
From: Andreas Hocevar [mailto:ahocevar at opengeo.org]
Sent: November 17, 2010 1:11 AM
To: Andrew Stewart
Cc: users at geoext.org
Subject: Re: [Users] Order of items in GeoExt.LayerContainer
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.
[This message has been scanned for security content threats and viruses.]
[The City of Red Deer I.T. Services asks that you please consider the environment before printing this e-mail.]
More information about the Users
mailing list