Image source refactoring

This commit is contained in:
Éric Lemoine
2013-09-22 09:58:05 +01:00
parent 0cc844a169
commit 5af738593e
14 changed files with 343 additions and 190 deletions

View File

@@ -24,12 +24,19 @@ ol.source.ImageWMS = function(opt_options) {
goog.base(this, {
attributions: options.attributions,
crossOrigin: options.crossOrigin,
extent: options.extent,
logo: options.logo,
projection: options.projection,
resolutions: options.resolutions
});
/**
* @private
* @type {?string}
*/
this.crossOrigin_ =
goog.isDef(options.crossOrigin) ? options.crossOrigin : null;
/**
* @private
* @type {string|undefined}
@@ -181,8 +188,8 @@ ol.source.ImageWMS.prototype.getImage =
var url = goog.uri.utils.appendParamsFromMap(this.url_, params);
this.image_ = new ol.Image(extent, resolution, pixelRatio, url,
this.crossOrigin, this.getAttributions());
this.image_ = new ol.Image(extent, resolution, pixelRatio,
this.getAttributions(), url, this.crossOrigin_);
return this.image_;
};