Add pixelRatio param to ol.Image constructor
This commit is contained in:
@@ -89,7 +89,7 @@ ol.source.Image.prototype.createImage =
|
||||
var imageUrl = this.imageUrlFunction(extent, size, projection);
|
||||
if (goog.isDef(imageUrl)) {
|
||||
image = new ol.Image(
|
||||
extent, resolution, imageUrl, this.crossOrigin_,
|
||||
extent, resolution, pixelRatio, imageUrl, this.crossOrigin_,
|
||||
this.getAttributions());
|
||||
}
|
||||
return image;
|
||||
|
||||
@@ -75,6 +75,7 @@ ol.source.ImageWMS.prototype.getImage =
|
||||
var image = this.image_;
|
||||
if (!goog.isNull(image) &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
ol.extent.containsExtent(image.getExtent(), extent)) {
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ ol.source.MapGuide.prototype.getImage =
|
||||
var image = this.image_;
|
||||
if (!goog.isNull(image) &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
ol.extent.containsExtent(image.getExtent(), extent)) {
|
||||
return image;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user