diff --git a/src/ol/image.js b/src/ol/image.js index e9eb53f848..222e78398a 100644 --- a/src/ol/image.js +++ b/src/ol/image.js @@ -6,7 +6,6 @@ goog.require('ol.ImageState'); goog.require('ol.events'); goog.require('ol.events.EventType'); goog.require('ol.extent'); -goog.require('ol.obj'); /** @@ -41,12 +40,6 @@ ol.Image = function(extent, resolution, pixelRatio, attributions, src, this.image_.crossOrigin = crossOrigin; } - /** - * @private - * @type {Object.} - */ - this.imageByContext_ = {}; - /** * @private * @type {Array.} @@ -73,22 +66,8 @@ ol.inherits(ol.Image, ol.ImageBase); * @inheritDoc * @api */ -ol.Image.prototype.getImage = function(opt_context) { - if (opt_context !== undefined) { - var image; - var key = ol.getUid(opt_context); - if (key in this.imageByContext_) { - return this.imageByContext_[key]; - } else if (ol.obj.isEmpty(this.imageByContext_)) { - image = this.image_; - } else { - image = /** @type {Image} */ (this.image_.cloneNode(false)); - } - this.imageByContext_[key] = image; - return image; - } else { - return this.image_; - } +ol.Image.prototype.getImage = function() { + return this.image_; }; diff --git a/src/ol/imagebase.js b/src/ol/imagebase.js index f69507467b..867d321107 100644 --- a/src/ol/imagebase.js +++ b/src/ol/imagebase.js @@ -79,10 +79,9 @@ ol.ImageBase.prototype.getExtent = function() { /** * @abstract - * @param {Object=} opt_context Object. * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image. */ -ol.ImageBase.prototype.getImage = function(opt_context) {}; +ol.ImageBase.prototype.getImage = function() {}; /** diff --git a/src/ol/imagecanvas.js b/src/ol/imagecanvas.js index 6f9053a421..748ac14e3d 100644 --- a/src/ol/imagecanvas.js +++ b/src/ol/imagecanvas.js @@ -87,6 +87,6 @@ ol.ImageCanvas.prototype.load = function() { /** * @inheritDoc */ -ol.ImageCanvas.prototype.getImage = function(opt_context) { +ol.ImageCanvas.prototype.getImage = function() { return this.canvas_; }; diff --git a/src/ol/reproj/image.js b/src/ol/reproj/image.js index 20f51e1e93..4dccd442b5 100644 --- a/src/ol/reproj/image.js +++ b/src/ol/reproj/image.js @@ -127,7 +127,7 @@ ol.reproj.Image.prototype.disposeInternal = function() { /** * @inheritDoc */ -ol.reproj.Image.prototype.getImage = function(opt_context) { +ol.reproj.Image.prototype.getImage = function() { return this.canvas_; };