[Users] Custom Layertree with GeoExt 2
Tobias Kirschke
tobias.kirschke at student.afg.hs-anhalt.de
Fri Mar 29 16:55:28 CET 2013
Hi,
in the example http://geoext.github.com/geoext2/examples/tree/tree.html
you see, how with the plugin gx_layercontainer all map layers are
displayed in the layertree. When I change the layerstore with less layer
nothing happens. You see always all map-layers. The layerstore is not
considered. What is wrong respectively how is the code?
In the example:
var treeStore = Ext.create('Ext.data.TreeStore', {
model: 'GeoExt.data.LayerTreeModel',
root: {
plugins: [{
ptype: 'gx_layercontainer',
store: mapPanel.layers
}],
expanded: true
}
});
now:
var lstore = new GeoExt.data.LayerStore({
map: map,
layers: [wms,global]
});
var treeStore = Ext.create('Ext.data.TreeStore', {
model: 'GeoExt.data.LayerTreeModel',
root: {
plugins: [{
ptype: 'gx_layercontainer',
store: lstore
}],
expanded: true
}
});
Thank you for the help,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20130329/63431ce0/attachment.htm
More information about the Users
mailing list