Hello all, I'm trying to build a layer tree in MVC application. I'm trying to manually set the tree nodes and not to use the map to store option. In the following code, layers is an array of OpenLayers.Layer objects that have displayInLayerSwitcher set to true.
var store = Ext.create('GeoExt.data.LayerStore', { map: map, initDir: 0, layers: layers }); var loader = Ext.create('GeoExt.tree.LayerLoader', { store: store }); var container = Ext.create('GeoExt.tree.BaseLayerContainer', { text: 'Arruamentos', expanded: true, loader: loader }); After this i'm manually appending the container to the tree root node. In the layer tree i get the parent node to be displayed (which is in fact the container) but i have no child nodes. My tree view is defined as follows: Ext.define('labnt.view.TocPanel', { extend: 'GeoExt.tree.Panel', alias: 'widget.tocPanel', title: 'TOC', iconCls: 'tocPanel-icon', rootVisible: false, initComponent: function(){ this.callParent(); } }); Any help would be very much appreciated :) Kind regards, -- Hugo Martins
_______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users