From 9d37090e6becfcef41c22d3824b8347e9ea54869 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 2 Mar 2015 09:34:53 +0100 Subject: [PATCH] Add new ol.source.WMTS#getFormat api function --- src/ol/source/wmtssource.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ol/source/wmtssource.js b/src/ol/source/wmtssource.js index 913948fa6b..0de3b78f7c 100644 --- a/src/ol/source/wmtssource.js +++ b/src/ol/source/wmtssource.js @@ -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 */