Add 'loadstart' and 'loadend' events to some of our exciting layers like WFS, GML, GeoRSS, and Text. tests to back it up. (Closes #808)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4252 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-09-13 01:23:06 +00:00
parent aa70587033
commit ff82936fba
9 changed files with 292 additions and 3 deletions
+10
View File
@@ -75,6 +75,13 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
*/
draw:function() {
if (OpenLayers.Tile.prototype.draw.apply(this, arguments)) {
if (this.isLoading) {
//if already loading, send 'reload' instead of 'loadstart'.
this.events.triggerEvent("reload");
} else {
this.isLoading = true;
this.events.triggerEvent("loadstart");
}
this.loadFeaturesForRegion(this.requestSuccess);
}
},
@@ -121,6 +128,9 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
this.addResults(resultFeatures);
}
}
if (this.events) {
this.events.triggerEvent("loadend");
}
},
/**