Add new ol.source.WMTS#getStyle api function
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user