Add image loading events to image sources
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
goog.provide('ol.source.ImageMapGuide');
|
||||
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.EventType');
|
||||
goog.require('goog.object');
|
||||
goog.require('goog.uri.utils');
|
||||
goog.require('ol.Image');
|
||||
@@ -15,6 +17,7 @@ goog.require('ol.source.Image');
|
||||
* Source for images from Mapguide servers
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.ImageEvent
|
||||
* @extends {ol.source.Image}
|
||||
* @param {olx.source.ImageMapGuideOptions} options Options.
|
||||
* @api stable
|
||||
@@ -150,6 +153,8 @@ ol.source.ImageMapGuide.prototype.getImage =
|
||||
image = new ol.Image(extent, resolution, pixelRatio,
|
||||
this.getAttributions(), imageUrl, this.crossOrigin_,
|
||||
this.imageLoadFunction_);
|
||||
goog.events.listen(image, goog.events.EventType.CHANGE,
|
||||
this.handleImageChange, false, this);
|
||||
} else {
|
||||
image = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user