Removing the simpleFilterSerializer method on OpenLayers.Protocol in favor of a format for serializing filters for use with query strings. r=sbrunner (closes #3163)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11758 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* TODO: remove this dependency in 3.0
|
||||
* @requires OpenLayers/Protocol/SimpleFilterSerializer.js
|
||||
* @requires OpenLayers/Format/QueryStringFilter.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -115,10 +115,14 @@ OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
this.headers = {};
|
||||
OpenLayers.Protocol.prototype.initialize.apply(this, arguments);
|
||||
|
||||
if (!this.filterToParams && OpenLayers.Protocol.simpleFilterSerializer) {
|
||||
this.filterToParams = OpenLayers.Function.bind(
|
||||
OpenLayers.Protocol.simpleFilterSerializer, this
|
||||
);
|
||||
if (!this.filterToParams && OpenLayers.Format.QueryStringFilter) {
|
||||
var format = new OpenLayers.Format.QueryStringFilter({
|
||||
wildcarded: this.wildcarded,
|
||||
srsInBBOX: this.srsInBBOX
|
||||
});
|
||||
this.filterToParams = function(filter, params) {
|
||||
return format.write(filter, params);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -146,7 +150,7 @@ OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
* Returns:
|
||||
* {Object} The resulting parameters object.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* APIMethod: read
|
||||
* Construct a request for reading new features.
|
||||
|
||||
Reference in New Issue
Block a user