From e01344f0da4ad19268a9e88f118e413c36abdcac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 7 Sep 2013 23:50:01 +0200 Subject: [PATCH] Be stricter with types in WMTS --- src/ol/source/wmtssource.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ol/source/wmtssource.js b/src/ol/source/wmtssource.js index 0e5a0312fa..cdb2a1f53e 100644 --- a/src/ol/source/wmtssource.js +++ b/src/ol/source/wmtssource.js @@ -75,10 +75,12 @@ ol.source.WMTS = function(options) { function createFromWMTSTemplate(template) { return ( /** + * @this {ol.source.WMTS} * @param {ol.TileCoord} tileCoord Tile coordinate. + * @param {ol.Projection} projection Projection. * @return {string|undefined} Tile URL. */ - function(tileCoord) { + function(tileCoord, projection) { if (goog.isNull(tileCoord)) { return undefined; } else { @@ -122,7 +124,13 @@ ol.source.WMTS = function(options) { var tmpExtent = ol.extent.createEmpty(); var tmpTileCoord = new ol.TileCoord(0, 0, 0); tileUrlFunction = ol.TileUrlFunction.withTileCoordTransform( - function(tileCoord, projection) { + /** + * @param {ol.TileCoord} tileCoord Tile coordinate. + * @param {ol.Projection} projection Projection. + * @param {ol.TileCoord=} opt_tileCoord Tile coordinate. + * @return {ol.TileCoord} Tile coordinate. + */ + function(tileCoord, projection, opt_tileCoord) { var tileGrid = this.getTileGrid(); goog.asserts.assert(!goog.isNull(tileGrid)); if (tileGrid.getResolutions().length <= tileCoord.z) {