Add ol.source.WMTS#getRequestEncoding
This commit is contained in:
@@ -96,10 +96,17 @@ ol.source.WMTS = function(options) {
|
||||
|
||||
// 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) ?
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.source.WMTSRequestEncoding}
|
||||
*/
|
||||
this.requestEncoding_ = goog.isDef(options.requestEncoding) ?
|
||||
/** @type {ol.source.WMTSRequestEncoding} */ (options.requestEncoding) :
|
||||
ol.source.WMTSRequestEncoding.KVP;
|
||||
|
||||
var requestEncoding = this.requestEncoding_;
|
||||
|
||||
// FIXME: should we create a default tileGrid?
|
||||
// we could issue a getCapabilities xhr to retrieve missing configuration
|
||||
var tileGrid = options.tileGrid;
|
||||
@@ -268,6 +275,16 @@ ol.source.WMTS.prototype.getMatrixSet = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Return the request encoding, either "KVP" or "REST".
|
||||
* @return {ol.source.WMTSRequestEncoding} Request encoding.
|
||||
* @api
|
||||
*/
|
||||
ol.source.WMTS.prototype.getRequestEncoding = function() {
|
||||
return this.requestEncoding_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Return the style of the WMTS source.
|
||||
* @return {string} Style.
|
||||
|
||||
Reference in New Issue
Block a user