hi everyone, I have a problem adding a WFS request as overlay on the openlayers map. Is there a way to tell it to search for other featureProperty elements then the basic "gml:featureMember" ? Is it realy hard-coded into the parser source that the featureProperty name shall be "gml:featureMember" ?
The WFS service is set up with a GML Application Profile which defines its "FeaturePropertyType" as a restriction of the generic gml:FeaturePropertyType (and similar for the FeatureCollectionType). This means that the structure of the GML returned from the WFS request is: <wfsos:featureCollection xmlns:wfsos="http://cweb.ksat.no/cweb/schema/geoweb/oil" ... schemaLocation="http://cweb.ksat.no/cweb/schema/geoweb/oil ...> <wfsos:featureMember> <wfsos:feature> <wfsos:oilSpill> <gml:Polygon srsName="EPSG:4326"> ........ It seems that the featureCollection level is ignored (as well as the schema location - since the schema is not loaded), so that one is not the problem. I can set the name space prefix, and element name for the "feature" level and the geometry, but can't find any way to do this for the featureMember level! If I run this from a file, and change the wfsos:featureMember into gml:featureMember it works fine (even if it violates the schema). To repeat the question: Is there any way to instruct openlayers to look for wfsos:featureMember instead ? PS: Here is the code for the WFS request linkage: wfs_ksat = new OpenLayers.Layer.Vector(id, { strategies: [new OpenLayers.Strategy.BBOX()], projection: new OpenLayers.Projection("EPSG:4326"), protocol: new OpenLayers.Protocol.WFS.v1_0_0({ url: ksatWFSuri, featureType: "feature", featureNS: "http://cweb.ksat.no/cweb/schema/geoweb/oil", featurePrefix: "wfsos", geometryName: "oilSpill", srsName: "EPSG:4326", readFormat: new OpenLayers.Format.GML(), outputFormat: "GML2" }), styleMap: styleMap }); _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
