Less special handling for WMS tiles

This commit is contained in:
Tim Schaub
2016-05-18 18:47:38 -06:00
parent 47cc4aac62
commit c5dcde4455

View File

@@ -63,13 +63,6 @@ ol.source.TileWMS = function(opt_options) {
*/
this.params_ = params;
/**
* @private
* @type {string}
*/
this.paramsKey_ = '';
this.resetParamsKey_();
/**
* @private
* @type {boolean}
@@ -103,6 +96,7 @@ ol.source.TileWMS = function(opt_options) {
this.tmpExtent_ = ol.extent.createEmpty();
this.updateV13_();
this.setKey(this.getKeyForParams_());
};
goog.inherits(ol.source.TileWMS, ol.source.TileImage);
@@ -182,14 +176,6 @@ ol.source.TileWMS.prototype.getGutterInternal = function() {
};
/**
* @inheritDoc
*/
ol.source.TileWMS.prototype.getKey = function() {
return this.paramsKey_;
};
/**
* @inheritDoc
*/
@@ -311,14 +297,15 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
/**
* @private
* @return {string} The key for the current params.
*/
ol.source.TileWMS.prototype.resetParamsKey_ = function() {
ol.source.TileWMS.prototype.getKeyForParams_ = function() {
var i = 0;
var res = [];
for (var key in this.params_) {
res[i++] = key + '-' + this.params_[key];
}
this.paramsKey_ = res.join('/');
return res.join('/');
};
@@ -378,9 +365,8 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
ol.source.TileWMS.prototype.updateParams = function(params) {
ol.object.assign(this.params_, params);
this.resetCoordKeyPrefix_();
this.resetParamsKey_();
this.updateV13_();
this.changed();
this.setKey(this.getKeyForParams_());
};