From 61d2506970415ec432cd3cff6c49f572dcb0f053 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 2 Mar 2015 09:31:56 +0100 Subject: [PATCH] Add new ol.source.WMTS#getStyle api function --- src/ol/source/wmtssource.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ol/source/wmtssource.js b/src/ol/source/wmtssource.js index e75f859e6d..fb10384567 100644 --- a/src/ol/source/wmtssource.js +++ b/src/ol/source/wmtssource.js @@ -62,6 +62,12 @@ ol.source.WMTS = function(options) { */ this.layer_ = options.layer; + /** + * @private + * @type {string} + */ + this.style_ = options.style; + // FIXME: should we guess this requestEncoding from options.url(s) // structure? that would mean KVP only if a template is not provided. var requestEncoding = goog.isDef(options.requestEncoding) ? @@ -76,7 +82,7 @@ ol.source.WMTS = function(options) { // replacement as some services use different naming conventions var context = { 'layer': this.layer_, - 'style': options.style, + 'style': this.style_, 'tilematrixset': options.matrixSet }; @@ -229,6 +235,15 @@ ol.source.WMTS.prototype.getLayer = function() { }; +/** + * @return {string} Style. + * @api + */ +ol.source.WMTS.prototype.getStyle = function() { + return this.style_; +}; + + /** * @private */