Use ol.object.assign() instead of goog.object.extend()

This commit is contained in:
Tim Schaub
2016-02-03 09:37:38 -07:00
parent a74af66d5f
commit 3c0ef430db
14 changed files with 49 additions and 51 deletions

View File

@@ -12,6 +12,7 @@ goog.require('ol');
goog.require('ol.Image');
goog.require('ol.ImageLoadFunctionType');
goog.require('ol.extent');
goog.require('ol.object');
goog.require('ol.proj');
goog.require('ol.source.Image');
goog.require('ol.source.wms');
@@ -61,9 +62,9 @@ ol.source.ImageWMS = function(opt_options) {
/**
* @private
* @type {Object}
* @type {!Object}
*/
this.params_ = options.params;
this.params_ = options.params || {};
/**
* @private
@@ -156,7 +157,7 @@ ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolut
'TRANSPARENT': true,
'QUERY_LAYERS': this.params_['LAYERS']
};
goog.object.extend(baseParams, this.params_, params);
ol.object.assign(baseParams, this.params_, params);
var x = Math.floor((coordinate[0] - extent[0]) / resolution);
var y = Math.floor((extent[3] - coordinate[1]) / resolution);
@@ -228,7 +229,7 @@ ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pix
'FORMAT': 'image/png',
'TRANSPARENT': true
};
goog.object.extend(params, this.params_);
ol.object.assign(params, this.params_);
this.imageSize_[0] = Math.ceil(imageWidth * this.ratio_);
this.imageSize_[1] = Math.ceil(imageHeight * this.ratio_);
@@ -360,7 +361,7 @@ ol.source.ImageWMS.prototype.setUrl = function(url) {
* @api stable
*/
ol.source.ImageWMS.prototype.updateParams = function(params) {
goog.object.extend(this.params_, params);
ol.object.assign(this.params_, params);
this.updateV13_();
this.image_ = null;
this.changed();