Loading strategies now trigger loadstart and loadend events. r=crschmidt (closes #1840)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8973 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-09 22:17:23 +00:00
parent 97f4ad54a3
commit 837efd0b9c
4 changed files with 117 additions and 14 deletions
+2
View File
@@ -176,6 +176,7 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
*/
triggerRead: function() {
this.layer.protocol.abort(this.response);
this.layer.events.triggerEvent("loadstart");
this.response = this.layer.protocol.read({
filter: this.createFilter(),
callback: this.merge,
@@ -231,6 +232,7 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
}
this.layer.addFeatures(features);
}
this.layer.events.triggerEvent("loadend");
},
CLASS_NAME: "OpenLayers.Strategy.BBOX"
+2
View File
@@ -71,6 +71,7 @@ OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, {
* Tells protocol to load data and unhooks the visibilitychanged event
*/
load: function() {
this.layer.events.triggerEvent("loadstart");
this.layer.protocol.read({
callback: this.merge,
scope: this
@@ -101,6 +102,7 @@ OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, {
}
this.layer.addFeatures(features);
}
this.layer.events.triggerEvent("loadend");
},
CLASS_NAME: "OpenLayers.Strategy.Fixed"