Use ol.object.assign() instead of goog.object.extend()
This commit is contained in:
@@ -12,6 +12,7 @@ goog.require('goog.uri.utils');
|
||||
goog.require('ol');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.object');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.size');
|
||||
goog.require('ol.source.TileImage');
|
||||
@@ -33,7 +34,7 @@ ol.source.TileWMS = function(opt_options) {
|
||||
|
||||
var options = opt_options || {};
|
||||
|
||||
var params = options.params !== undefined ? options.params : {};
|
||||
var params = options.params || {};
|
||||
|
||||
var transparent = goog.object.get(params, 'TRANSPARENT', true);
|
||||
|
||||
@@ -59,7 +60,7 @@ ol.source.TileWMS = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object}
|
||||
* @type {!Object}
|
||||
*/
|
||||
this.params_ = params;
|
||||
|
||||
@@ -161,7 +162,7 @@ ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resoluti
|
||||
'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] - tileExtent[0]) / tileResolution);
|
||||
var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);
|
||||
@@ -363,7 +364,7 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
|
||||
'FORMAT': 'image/png',
|
||||
'TRANSPARENT': true
|
||||
};
|
||||
goog.object.extend(baseParams, this.params_);
|
||||
ol.object.assign(baseParams, this.params_);
|
||||
|
||||
return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, baseParams);
|
||||
@@ -376,7 +377,7 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.TileWMS.prototype.updateParams = function(params) {
|
||||
goog.object.extend(this.params_, params);
|
||||
ol.object.assign(this.params_, params);
|
||||
this.resetCoordKeyPrefix_();
|
||||
this.resetParamsKey_();
|
||||
this.updateV13_();
|
||||
|
||||
Reference in New Issue
Block a user