Get rid of unnecessary coord key prefix
This commit is contained in:
@@ -81,13 +81,6 @@ ol.source.TileWMS = function(opt_options) {
|
||||
*/
|
||||
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
*/
|
||||
this.coordKeyPrefix_ = '';
|
||||
this.resetCoordKeyPrefix_();
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Extent}
|
||||
@@ -171,14 +164,6 @@ ol.source.TileWMS.prototype.getGutterInternal = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.source.TileWMS.prototype.getKeyZXY = function(z, x, y) {
|
||||
return this.coordKeyPrefix_ + ol.source.TileImage.prototype.getKeyZXY.call(this, z, x, y);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the user-provided params, i.e. those passed to the constructor through
|
||||
* the "params" option, and possibly updated using the updateParams method.
|
||||
@@ -273,24 +258,6 @@ ol.source.TileWMS.prototype.getTilePixelRatio = function(pixelRatio) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
|
||||
var i = 0;
|
||||
var res = [];
|
||||
|
||||
if (this.urls) {
|
||||
var j, jj;
|
||||
for (j = 0, jj = this.urls.length; j < jj; ++j) {
|
||||
res[i++] = this.urls[j];
|
||||
}
|
||||
}
|
||||
|
||||
this.coordKeyPrefix_ = res.join('#');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @return {string} The key for the current params.
|
||||
@@ -352,15 +319,6 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
|
||||
pixelRatio, projection, baseParams);
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.source.TileWMS.prototype.setUrls = function(urls) {
|
||||
ol.source.TileImage.prototype.setUrls.call(this, urls);
|
||||
this.resetCoordKeyPrefix_();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Update the user-provided params.
|
||||
* @param {Object} params Params.
|
||||
@@ -368,7 +326,6 @@ ol.source.TileWMS.prototype.setUrls = function(urls) {
|
||||
*/
|
||||
ol.source.TileWMS.prototype.updateParams = function(params) {
|
||||
ol.obj.assign(this.params_, params);
|
||||
this.resetCoordKeyPrefix_();
|
||||
this.updateV13_();
|
||||
this.setKey(this.getKeyForParams_());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user