Filter formats inherit from GML formats. WFST formats inherit from Filter formats. This lets you do things like set xy on the filter format if you specify an srsName for which wy is false. r=crschmidt (closes #1962)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8916 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-02-28 21:45:01 +00:00
parent a55bef1cba
commit 4d2d90ca51
9 changed files with 20 additions and 29 deletions

View File

@@ -81,26 +81,11 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
* this instance.
*/
initialize: function(options) {
if(options.featureNS) {
this.namespaces = OpenLayers.Util.extend(
{feature: options.featureNS},
OpenLayers.Format.WFST.v1.prototype.namespaces
);
}
// set state name mapping
this.stateName = {};
this.stateName[OpenLayers.State.INSERT] = "wfs:Insert";
this.stateName[OpenLayers.State.UPDATE] = "wfs:Update";
this.stateName[OpenLayers.State.DELETE] = "wfs:Delete";
// extend format with misc properties from filter and gml formats
var filterProto = OpenLayers.Format.Filter.v1.prototype;
var gmlProto = OpenLayers.Format.GML.Base.prototype;
OpenLayers.Util.extend(this, {
readOgcExpression: filterProto.readOgcExpression,
getFilterType: filterProto.getFilterType,
filterMap: filterProto.filterMap,
regExes: gmlProto.regExes
});
OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
},