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;
|
this.layer_ = options.layer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
this.style_ = options.style;
|
||||||
|
|
||||||
// FIXME: should we guess this requestEncoding from options.url(s)
|
// FIXME: should we guess this requestEncoding from options.url(s)
|
||||||
// structure? that would mean KVP only if a template is not provided.
|
// structure? that would mean KVP only if a template is not provided.
|
||||||
var requestEncoding = goog.isDef(options.requestEncoding) ?
|
var requestEncoding = goog.isDef(options.requestEncoding) ?
|
||||||
@@ -76,7 +82,7 @@ ol.source.WMTS = function(options) {
|
|||||||
// replacement as some services use different naming conventions
|
// replacement as some services use different naming conventions
|
||||||
var context = {
|
var context = {
|
||||||
'layer': this.layer_,
|
'layer': this.layer_,
|
||||||
'style': options.style,
|
'style': this.style_,
|
||||||
'tilematrixset': options.matrixSet
|
'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
|
* @private
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user