[Users] ExtJs + GeoExt LayerTree Showing no layers

Christian Mayer Christian.Mayer at isb-ag.de
Tue Feb 4 12:21:25 CET 2014


Hello Kyle,

 

I just had a short look at your code. It seems that don't use the
ComponentQuery in the right way: As [1] says it always returns an array of
matched Components.

So you should change your code in ArcticTree.js

store: Ext.ComponentQuery.query('#ArcticMap').layers

to something like 

store: Ext.ComponentQuery.query('#ArcticMap')[0].layers

 

Maybe you try it like this and give a feedback on the list if there are any
further issues or if this was your problem

 

Best regards,

Chris

[1] http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.ComponentQuery-method-query

 

Von: users-bounces at geoext.org [mailto:users-bounces at geoext.org] Im Auftrag
von Purdon
Gesendet: Montag, 3. Februar 2014 17:02
An: users at geoext.org
Betreff: [Users] ExtJs + GeoExt LayerTree Showing no layers

 

Instead of pasting a bunch of code i'll link to my question here:
http://gis.stackexchange.com/questions/84999/extjsgeoext-layertree-map-and-tr
ee-in-separate-views-cannot-get-layers-store

 

A short discription of my issue:

- Trying to set up an ExtJS app using there MVC layout (not so conducive to
the GeoExt examples). Placing the map/tree into separate views and then
pulling the layers store from the map using a component query. Visually
everything shows up, but there are no layers in the tree. If I look at the
result of the component query it is the same as the direct pull of
"MapPanel.layers" in the GeoExt LayerTree example.

 

I'm hoping some of the list users here will be able to help!

 

Thanks,

 

Kyle W. Purdon

Research Assistant | Center for Remote Sensing of Ice Sheets (CReSIS)

https://www.cresis.ku.edu/~kpurdon/

Graduate Student | University of Kansas Geography (GIS)

http://www.geog.ku.edu/ <http://www.geog.ku.edu/> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20140204/dc9c4670/attachment.htm 


More information about the Users mailing list