diff --git a/lib/OpenLayers/Format/Filter/v1.js b/lib/OpenLayers/Format/Filter/v1.js index d4f5080f5d..c81654623d 100644 --- a/lib/OpenLayers/Format/Filter/v1.js +++ b/lib/OpenLayers/Format/Filter/v1.js @@ -4,6 +4,7 @@ /** * @requires OpenLayers/Format/Filter.js + * @requires OpenLayers/Format/XML.js */ /** diff --git a/lib/OpenLayers/Format/Filter/v1_0_0.js b/lib/OpenLayers/Format/Filter/v1_0_0.js index af2fe1c344..a10ed50755 100644 --- a/lib/OpenLayers/Format/Filter/v1_0_0.js +++ b/lib/OpenLayers/Format/Filter/v1_0_0.js @@ -12,10 +12,11 @@ * Write ogc:Filter version 1.0.0. * * Inherits from: + * - * - */ OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( - OpenLayers.Format.Filter.v1, { + OpenLayers.Format.GML.v2, OpenLayers.Format.Filter.v1, { /** * Constant: VERSION @@ -39,7 +40,7 @@ OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( * this instance. */ initialize: function(options) { - OpenLayers.Format.Filter.v1.prototype.initialize.apply( + OpenLayers.Format.GML.v2.prototype.initialize.apply( this, [options] ); }, diff --git a/lib/OpenLayers/Format/Filter/v1_1_0.js b/lib/OpenLayers/Format/Filter/v1_1_0.js index 489fdae980..9042503630 100644 --- a/lib/OpenLayers/Format/Filter/v1_1_0.js +++ b/lib/OpenLayers/Format/Filter/v1_1_0.js @@ -22,7 +22,7 @@ * - */ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( - OpenLayers.Format.Filter.v1, { + OpenLayers.Format.GML.v3, OpenLayers.Format.Filter.v1, { /** * Constant: VERSION @@ -46,7 +46,7 @@ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( * this instance. */ initialize: function(options) { - OpenLayers.Format.Filter.v1.prototype.initialize.apply( + OpenLayers.Format.GML.v3.prototype.initialize.apply( this, [options] ); }, diff --git a/lib/OpenLayers/Format/GML/Base.js b/lib/OpenLayers/Format/GML/Base.js index dad23bb6e2..15aec86de8 100644 --- a/lib/OpenLayers/Format/GML/Base.js +++ b/lib/OpenLayers/Format/GML/Base.js @@ -122,8 +122,10 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { */ initialize: function(options) { OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); - this.setNamespace("feature", options.featureNS); this.setGeometryTypes(); + if(options && options.featureNS) { + this.setNamespace("feature", options.featureNS); + } }, /** diff --git a/lib/OpenLayers/Format/WFST/v1.js b/lib/OpenLayers/Format/WFST/v1.js index cf377ae07e..76ee261bd8 100644 --- a/lib/OpenLayers/Format/WFST/v1.js +++ b/lib/OpenLayers/Format/WFST/v1.js @@ -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]); }, diff --git a/lib/OpenLayers/Format/WFST/v1_0_0.js b/lib/OpenLayers/Format/WFST/v1_0_0.js index 899e6ddf21..75496de1fa 100644 --- a/lib/OpenLayers/Format/WFST/v1_0_0.js +++ b/lib/OpenLayers/Format/WFST/v1_0_0.js @@ -1,6 +1,5 @@ /** * @requires OpenLayers/Format/WFST/v1.js - * @requires OpenLayers/Format/GML/v2.js * @requires OpenLayers/Format/Filter/v1_0_0.js */ @@ -10,9 +9,11 @@ * constructor. * * Inherits from: + * - * - */ -OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(OpenLayers.Format.WFST.v1, { +OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( + OpenLayers.Format.Filter.v1_0_0, OpenLayers.Format.WFST.v1, { /** * Property: version @@ -44,8 +45,8 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(OpenLayers.Format.WFST.v1, { * geometryName - {String} Name of geometry attribute. Default is 'the_geom'. */ initialize: function(options) { + OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this, [options]); OpenLayers.Format.WFST.v1.prototype.initialize.apply(this, [options]); - OpenLayers.Format.GML.v2.prototype.setGeometryTypes.call(this); }, /** diff --git a/lib/OpenLayers/Format/WFST/v1_1_0.js b/lib/OpenLayers/Format/WFST/v1_1_0.js index a616015348..c2111653e6 100644 --- a/lib/OpenLayers/Format/WFST/v1_1_0.js +++ b/lib/OpenLayers/Format/WFST/v1_1_0.js @@ -1,6 +1,5 @@ /** * @requires OpenLayers/Format/WFST/v1.js - * @requires OpenLayers/Format/GML/v3.js * @requires OpenLayers/Format/Filter/v1_1_0.js */ @@ -10,9 +9,11 @@ * constructor. * * Inherits from: + * - * - */ -OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(OpenLayers.Format.WFST.v1, { +OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( + OpenLayers.Format.Filter.v1_1_0, OpenLayers.Format.WFST.v1, { /** * Property: version @@ -44,8 +45,8 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(OpenLayers.Format.WFST.v1, { * geometryName - {String} Name of geometry attribute. Default is 'the_geom'. */ initialize: function(options) { + OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this, [options]); OpenLayers.Format.WFST.v1.prototype.initialize.apply(this, [options]); - OpenLayers.Format.GML.v3.prototype.setGeometryTypes.call(this); }, /** diff --git a/tests/Format/Filter/v1_0_0.html b/tests/Format/Filter/v1_0_0.html index 11a62074cc..b268392267 100644 --- a/tests/Format/Filter/v1_0_0.html +++ b/tests/Format/Filter/v1_0_0.html @@ -67,7 +67,7 @@ '' + 'the_geom' + '' + - '-90,-180 90,180' + + '-180,-90 180,90' + '' + '' + ''; diff --git a/tests/Format/Filter/v1_1_0.html b/tests/Format/Filter/v1_1_0.html index e37187709e..cef81ec19c 100644 --- a/tests/Format/Filter/v1_1_0.html +++ b/tests/Format/Filter/v1_1_0.html @@ -155,8 +155,8 @@ '' + 'the_geom' + '' + - '-90 -180' + - '90 180' + + '-180 -90' + + '180 90' + '' + '' + '';