Allow olx.source.WMTSOptions#requestEncoding to be a string

This commit is contained in:
Frederic Junod
2014-10-27 13:48:47 +01:00
parent 70375d5227
commit 398b1f86ce
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ var source = new ol.source.WMTS({
style: 'normal', style: 'normal',
matrixSet: 'google3857', matrixSet: 'google3857',
urls: urls, urls: urls,
requestEncoding: /** @type {ol.source.WMTSRequestEncoding} */ ('REST'), requestEncoding: 'REST',
tileGrid: new ol.tilegrid.WMTS({ tileGrid: new ol.tilegrid.WMTS({
origin: [-20037508.3428, 20037508.3428], origin: [-20037508.3428, 20037508.3428],
resolutions: [ resolutions: [
+2 -2
View File
@@ -4987,7 +4987,7 @@ olx.source.StaticVectorOptions.prototype.urls;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* tileGrid: ol.tilegrid.WMTS, * tileGrid: ol.tilegrid.WMTS,
* projection: ol.proj.ProjectionLike, * projection: ol.proj.ProjectionLike,
* requestEncoding: (ol.source.WMTSRequestEncoding|undefined), * requestEncoding: (ol.source.WMTSRequestEncoding|string|undefined),
* layer: string, * layer: string,
* style: string, * style: string,
* tilePixelRatio: (number|undefined), * tilePixelRatio: (number|undefined),
@@ -5049,7 +5049,7 @@ olx.source.WMTSOptions.prototype.projection;
/** /**
* Request encoding. Default is `KVP`. * Request encoding. Default is `KVP`.
* @type {ol.source.WMTSRequestEncoding|undefined} * @type {ol.source.WMTSRequestEncoding|string|undefined}
* @api * @api
*/ */
olx.source.WMTSOptions.prototype.requestEncoding; olx.source.WMTSOptions.prototype.requestEncoding;
+2 -1
View File
@@ -59,7 +59,8 @@ ol.source.WMTS = function(options) {
// 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) ?
options.requestEncoding : ol.source.WMTSRequestEncoding.KVP; /** @type {ol.source.WMTSRequestEncoding} */ (options.requestEncoding) :
ol.source.WMTSRequestEncoding.KVP;
// FIXME: should we create a default tileGrid? // FIXME: should we create a default tileGrid?
// we could issue a getCapabilities xhr to retrieve missing configuration // we could issue a getCapabilities xhr to retrieve missing configuration