Remember rendered revision in ol.source.ImageWMS
This commit is contained in:
@@ -74,6 +74,12 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
*/
|
||||
this.image_ = null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.renderedRevision_ = 0;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
@@ -112,6 +118,7 @@ ol.source.ImageWMS.prototype.getImage =
|
||||
|
||||
var image = this.image_;
|
||||
if (!goog.isNull(image) &&
|
||||
this.renderedRevision_ == this.getRevision() &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
ol.extent.containsExtent(image.getExtent(), extent)) {
|
||||
@@ -190,6 +197,7 @@ ol.source.ImageWMS.prototype.getImage =
|
||||
|
||||
this.image_ = new ol.Image(extent, resolution, pixelRatio,
|
||||
this.getAttributions(), url, this.crossOrigin_);
|
||||
this.renderedRevision_ = this.getRevision();
|
||||
return this.image_;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user