[Users] Do not work me the DescribeFeatureType query to create a Attribute Store
jcortega at dipalme.org
jcortega at dipalme.org
Wed Jun 27 10:36:00 CEST 2012
Hi all,
I'm following the tutorial “Developing OGC Compliant Web Applications with
Geoext” and I have some problem with the second lesson 3.1 “ Creating a
Synchronized Grid and Map View of WFS Features”
http://workshops.opengeo.org/geoext/wfs/grid.html.
I'm trying to create a gridpanel in Geoext, that must be filled with the
names of the fields from an AttributeStore and then create their own
FeatureStore with the values of these fields and update the grid panel.
The problem is that when I select a layer and execute the funcion setLayer
that create the attribute sotore (schema), no execute never the listener
load and therefore I can not get the name of fields
My code is as follows:
function setLayer(model, node) {
if(!(node && node.layer instanceof OpenLayers.Layer.WMS))
{
return;
}
selectedLayer = null;
vectorLayer.removeAllFeatures();
app.featureGrid.reconfigure( new Ext.data.Store(),new
Ext.grid.ColumnModel([]) );
var layer = node.layer;
var url = layer.url.split("?")[0];
alert("capa seleccionada: " + layer.params.LAYERS);
schema = new GeoExt.data.AttributeStore({
url: url,
baseParams: {
"SERVICE": "WFS",
"REQUEST": "DescribeFeatureType",
"VERSION": "1.1.0",
"TYPENAME": layer.params.LAYERS
},
autoLoad: true,
listeners: {
load :
function(store, records, index) {
alert ("load");
app.featureGrid.setTitle(layer.name);
selectedLayer = layer;
configureGrid(store, url);
}
} //listeners
}); // final de schema
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120627/3201aed9/attachment.htm
More information about the Users
mailing list