Add imageLoadFunction option for ol.source.ImageStatic
This commit is contained in:
@@ -4535,6 +4535,7 @@ olx.source.StamenOptions.prototype.url;
|
|||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* imageExtent: (ol.Extent),
|
* imageExtent: (ol.Extent),
|
||||||
* imageSize: (ol.Size|undefined),
|
* imageSize: (ol.Size|undefined),
|
||||||
|
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
* logo: (string|olx.LogoOptions|undefined),
|
||||||
* projection: ol.proj.ProjectionLike,
|
* projection: ol.proj.ProjectionLike,
|
||||||
* url: string}}
|
* url: string}}
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ ol.source.ImageStatic = function(options) {
|
|||||||
var crossOrigin = goog.isDef(options.crossOrigin) ?
|
var crossOrigin = goog.isDef(options.crossOrigin) ?
|
||||||
options.crossOrigin : null;
|
options.crossOrigin : null;
|
||||||
|
|
||||||
|
var imageLoadFunction = goog.isDef(options.imageLoadFunction) ?
|
||||||
|
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
attributions: attributions,
|
attributions: attributions,
|
||||||
logo: options.logo,
|
logo: options.logo,
|
||||||
@@ -46,7 +49,7 @@ ol.source.ImageStatic = function(options) {
|
|||||||
* @type {ol.Image}
|
* @type {ol.Image}
|
||||||
*/
|
*/
|
||||||
this.image_ = new ol.Image(imageExtent, resolution, 1, attributions,
|
this.image_ = new ol.Image(imageExtent, resolution, 1, attributions,
|
||||||
options.url, crossOrigin);
|
options.url, crossOrigin, imageLoadFunction);
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.source.ImageStatic, ol.source.Image);
|
goog.inherits(ol.source.ImageStatic, ol.source.Image);
|
||||||
|
|||||||
Reference in New Issue
Block a user