Add imageLoadFunction option for ol.source.ImageWMS
This commit is contained in:
@@ -8,6 +8,7 @@ goog.require('goog.string');
|
||||
goog.require('goog.uri.utils');
|
||||
goog.require('ol');
|
||||
goog.require('ol.Image');
|
||||
goog.require('ol.ImageLoadFunctionType');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.source.Image');
|
||||
@@ -49,6 +50,13 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
*/
|
||||
this.url_ = options.url;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.ImageLoadFunctionType}
|
||||
*/
|
||||
this.imageLoadFunction_ = goog.isDef(options.imageLoadFunction) ?
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object}
|
||||
@@ -235,7 +243,7 @@ ol.source.ImageWMS.prototype.getImage =
|
||||
projection, params);
|
||||
|
||||
this.image_ = new ol.Image(extent, resolution, pixelRatio,
|
||||
this.getAttributions(), url, this.crossOrigin_);
|
||||
this.getAttributions(), url, this.crossOrigin_, this.imageLoadFunction_);
|
||||
|
||||
this.renderedRevision_ = this.getRevision();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user