Add image loading events to image sources

This commit is contained in:
Bart van den Eijnden
2015-03-03 19:53:32 +01:00
parent 3a7b9751d7
commit 4569858882
8 changed files with 294 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ ol.Image.prototype.handleImageLoad_ = function() {
ol.Image.prototype.load = function() {
if (this.state == ol.ImageState.IDLE) {
this.state = ol.ImageState.LOADING;
this.changed();
goog.asserts.assert(goog.isNull(this.imageListenerKeys_));
this.imageListenerKeys_ = [
goog.events.listenOnce(this.image_, goog.events.EventType.ERROR,