Merge pull request #6300 from fredj/hidpi_ImageArcGISRest

Add missing hidpi option for ol.source.ImageArcGISRest
This commit is contained in:
Frédéric Junod
2017-01-09 08:28:50 +01:00
committed by GitHub
2 changed files with 17 additions and 0 deletions

View File

@@ -44,6 +44,12 @@ ol.source.ImageArcGISRest = function(opt_options) {
this.crossOrigin_ =
options.crossOrigin !== undefined ? options.crossOrigin : null;
/**
* @private
* @type {boolean}
*/
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
/**
* @private
* @type {string|undefined}
@@ -114,6 +120,7 @@ ol.source.ImageArcGISRest.prototype.getImageInternal = function(extent, resoluti
}
resolution = this.findNearestResolution(resolution);
pixelRatio = this.hidpi_ ? pixelRatio : 1;
var image = this.image_;
if (image &&