Add new ol.source.WMTS#getFormat api function

This commit is contained in:
Frederic Junod
2015-03-02 09:34:53 +01:00
parent b42a214252
commit 9d37090e6b

View File

@@ -46,7 +46,11 @@ ol.source.WMTS = function(options) {
*/
this.version_ = goog.isDef(options.version) ? options.version : '1.0.0';
var format = goog.isDef(options.format) ? options.format : 'image/jpeg';
/**
* @private
* @type {string}
*/
this.format_ = goog.isDef(options.format) ? options.format : 'image/jpeg';
/**
* @private
@@ -96,7 +100,7 @@ ol.source.WMTS = function(options) {
'Service': 'WMTS',
'Request': 'GetTile',
'Version': this.version_,
'Format': format
'Format': this.format_
});
}
@@ -223,6 +227,15 @@ ol.source.WMTS.prototype.getDimensions = function() {
};
/**
* @return {string} Format.
* @api
*/
ol.source.WMTS.prototype.getFormat = function() {
return this.format_;
};
/**
* @inheritDoc
*/