[OpenLayers-Dev] wfs: loadend event raise twice
Steffen G
martsystems at gmx.net
Wed Jan 8 03:05:19 PST 2014
Hi,
according:
http://osgeo-org.1560.x6.nabble.com/listener-function-on-event-quot-loadend-quot-runs-twice-td3912631.html#a5096934
same problem exist in OL 2.13.
Overwriting the triggerRead() method solve it.
OpenLayers.Strategy.BBOX.prototype.triggerRead = function(options) {
/* original code:
if (this.response) { // in my option not correct maybe
this.response.error
this.layer.protocol.abort(this.response);
this.layer.events.triggerEvent("loadend"); // raise without error
}*/
this.layer.events.triggerEvent("loadstart");
this.response = this.layer.protocol.read(
OpenLayers.Util.applyDefaults({
filter: this.createFilter(),
callback: this.merge,
scope: this
}, options));
};
Please can someone check if "if (this.response)" in line 3 correct.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/wfs-loadend-event-raise-twice-tp5096936.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
More information about the Dev
mailing list