Correct type for WMTS source options

This commit is contained in:
Tim Schaub
2018-04-19 18:00:28 -06:00
parent 81693cefbf
commit c75b87a2a0
4 changed files with 4 additions and 4 deletions

View File

@@ -112,7 +112,7 @@ fetch(url).then(function(response) {
options.projection = 'EPSG:3413'; options.projection = 'EPSG:3413';
options.wrapX = false; options.wrapX = false;
layers['wmts3413'] = new TileLayer({ layers['wmts3413'] = new TileLayer({
source: new WMTS(/** @type {!olx.source.WMTSOptions} */ (options)) source: new WMTS(/** @type {!module:ol/source/WMTS~Options} */ (options))
}); });
}); });

View File

@@ -34,6 +34,6 @@ fetch(capabilitiesUrl).then(function(response) {
}); });
options.tilePixelRatio = tilePixelRatio; options.tilePixelRatio = tilePixelRatio;
map.addLayer(new TileLayer({ map.addLayer(new TileLayer({
source: new WMTS(/** @type {!olx.source.WMTSOptions} */ (options)) source: new WMTS(/** @type {!module:ol/source/WMTS~Options} */ (options))
})); }));
}); });

View File

@@ -25,7 +25,7 @@ fetch('data/WMTSCapabilities.xml').then(function(response) {
}), }),
new TileLayer({ new TileLayer({
opacity: 1, opacity: 1,
source: new WMTS(/** @type {!olx.source.WMTSOptions} */ (options)) source: new WMTS(/** @type {!module:ol/source/WMTS~Options} */ (options))
}) })
], ],
target: 'map', target: 'map',

View File

@@ -352,7 +352,7 @@ WMTS.prototype.updateDimensions = function(dimensions) {
* - format - {string} Image format for the layer. Default is the first * - format - {string} Image format for the layer. Default is the first
* format returned in the GetCapabilities response. * format returned in the GetCapabilities response.
* - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`. * - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.
* @return {?olx.source.WMTSOptions} WMTS source options object or `null` if the layer was not found. * @return {?module:ol/source/WMTS~Options} WMTS source options object or `null` if the layer was not found.
* @api * @api
*/ */
export function optionsFromCapabilities(wmtsCap, config) { export function optionsFromCapabilities(wmtsCap, config) {