[Users] Layer tree based on WFSCapabilitiesStore
Matt Priour
mpriour at kestrelcomputer.com
Fri Aug 12 06:51:51 CEST 2011
The tree is not synchronized with the store. It just uses it to build the nodes. Changes in the LayerStore don’t automatically reflect in the tree. So if you look at your code, you can see that it is trying to build a tree from an empty store.
The layerTree code needs to execute AFTER the store has loaded.
Matt Priour
Kestrel Computer Consulting
From: Denis Rykov
Sent: Thursday, August 11, 2011 11:44 PM
To: Users at geoext.org
Subject: [Users] Layer tree based on WFSCapabilitiesStore
Is it possible to build layer tree based on WFSCapabilitiesStore?
I try to make it as following:
<script>
var store, layerList;
Ext.onReady(function() {
Ext.onReady(function() {
// create a new WFS capabilities store
store = new GeoExt.data.WFSCapabilitiesStore({
url:
"http://map.rostmuseum.ru/scripts/tinyows/tinyows.cgi?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities",
layerOptions: function() {
return {
visibility: false,
displayInLayerSwitcher: false,
strategies: [new
OpenLayers.Strategy.BBOX({ratio: 1})]
};
}
});
layerList = new GeoExt.tree.LayerContainer({
text: 'All Layers',
layerStore: store,
leaf: false,
expanded: true
});
var layerTree = new Ext.tree.TreePanel({
title: 'Map Layers',
renderTo: 'capgrid',
root: layerList
});
store.load();
});
});
</script>
But it not works.
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110811/44ba6031/attachment-0001.htm
More information about the Users
mailing list