Allow olx.source.WMTSOptions#requestEncoding to be a string
This commit is contained in:
@@ -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
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user