From 0f70a21ba672a81f75b11d09d6aa9fd6a51a237f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 12 Nov 2015 10:54:45 +0100 Subject: [PATCH] Implement getKeyParams in ol.source.WMTS --- src/ol/source/wmtssource.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ol/source/wmtssource.js b/src/ol/source/wmtssource.js index 14483b02d5..26a8628022 100644 --- a/src/ol/source/wmtssource.js +++ b/src/ol/source/wmtssource.js @@ -61,8 +61,8 @@ ol.source.WMTS = function(options) { * @private * @type {string} */ - this.coordKeyPrefix_ = ''; - this.resetCoordKeyPrefix_(); + this.dimensionsKey_ = ''; + this.resetDimensionsKey_(); /** * @private @@ -218,8 +218,8 @@ ol.source.WMTS.prototype.getFormat = function() { /** * @inheritDoc */ -ol.source.WMTS.prototype.getKeyZXY = function(z, x, y) { - return this.coordKeyPrefix_ + goog.base(this, 'getKeyZXY', z, x, y); +ol.source.WMTS.prototype.getKeyParams = function() { + return this.dimensionsKey_; }; @@ -276,13 +276,13 @@ ol.source.WMTS.prototype.getVersion = function() { /** * @private */ -ol.source.WMTS.prototype.resetCoordKeyPrefix_ = function() { +ol.source.WMTS.prototype.resetDimensionsKey_ = function() { var i = 0; var res = []; for (var key in this.dimensions_) { res[i++] = key + '-' + this.dimensions_[key]; } - this.coordKeyPrefix_ = res.join('/'); + this.dimensionsKey_ = res.join('/'); }; @@ -293,7 +293,7 @@ ol.source.WMTS.prototype.resetCoordKeyPrefix_ = function() { */ ol.source.WMTS.prototype.updateDimensions = function(dimensions) { goog.object.extend(this.dimensions_, dimensions); - this.resetCoordKeyPrefix_(); + this.resetDimensionsKey_(); this.changed(); };