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:
@@ -47,7 +47,14 @@ OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
|
||||
this.features = new Array();
|
||||
if (this.location != null) {
|
||||
OpenLayers.loadURL(this.location, null, this, this.parseData);
|
||||
|
||||
var onFail = function(e) {
|
||||
this.events.triggerEvent("loadend");
|
||||
};
|
||||
|
||||
this.events.triggerEvent("loadstart");
|
||||
OpenLayers.loadURL(this.location, null,
|
||||
this, this.parseData, onFail);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -155,6 +162,7 @@ OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
}
|
||||
}
|
||||
}
|
||||
this.events.triggerEvent("loadend");
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user