Add missing hidpi option for ol.source.ImageArcGISRest
This commit is contained in:
@@ -5064,6 +5064,7 @@ olx.source.OSMOptions.prototype.wrapX;
|
|||||||
/**
|
/**
|
||||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
|
* hidpi: (boolean|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
* logo: (string|olx.LogoOptions|undefined),
|
||||||
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
||||||
* params: Object.<string,*>,
|
* params: Object.<string,*>,
|
||||||
@@ -5095,6 +5096,15 @@ olx.source.ImageArcGISRestOptions.prototype.attributions;
|
|||||||
olx.source.ImageArcGISRestOptions.prototype.crossOrigin;
|
olx.source.ImageArcGISRestOptions.prototype.crossOrigin;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the `ol.Map#pixelRatio` value when requesting the image from the remote
|
||||||
|
* server. Default is `true`.
|
||||||
|
* @type {boolean|undefined}
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
olx.source.ImageArcGISRestOptions.prototype.hidpi;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logo.
|
* Logo.
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
* @type {string|olx.LogoOptions|undefined}
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ ol.source.ImageArcGISRest = function(opt_options) {
|
|||||||
this.crossOrigin_ =
|
this.crossOrigin_ =
|
||||||
options.crossOrigin !== undefined ? options.crossOrigin : null;
|
options.crossOrigin !== undefined ? options.crossOrigin : null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {string|undefined}
|
* @type {string|undefined}
|
||||||
@@ -114,6 +120,7 @@ ol.source.ImageArcGISRest.prototype.getImageInternal = function(extent, resoluti
|
|||||||
}
|
}
|
||||||
|
|
||||||
resolution = this.findNearestResolution(resolution);
|
resolution = this.findNearestResolution(resolution);
|
||||||
|
pixelRatio = this.hidpi_ ? pixelRatio : 1;
|
||||||
|
|
||||||
var image = this.image_;
|
var image = this.image_;
|
||||||
if (image &&
|
if (image &&
|
||||||
|
|||||||
Reference in New Issue
Block a user