[Users] Layer tree based on WFSCapabilitiesStore
Denis Rykov
rykovd at gmail.com
Fri Aug 12 06:44:21 CEST 2011
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.
More information about the Users
mailing list