From 1e308e34f987aa759b5a95722a912ea77ae60794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 7 Sep 2013 23:32:02 +0200 Subject: [PATCH] Stricter type def for ol.TileUrlFunctionType --- src/ol/tileurlfunction.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ol/tileurlfunction.js b/src/ol/tileurlfunction.js index 545ae0e6a3..4ba3922ddf 100644 --- a/src/ol/tileurlfunction.js +++ b/src/ol/tileurlfunction.js @@ -8,7 +8,8 @@ goog.require('ol.extent'); /** - * @typedef {function(ol.TileCoord, ol.Projection): (string|undefined)} + * @typedef {function(this: ol.source.ImageTileSource, ol.TileCoord, + * ol.Projection): (string|undefined)} */ ol.TileUrlFunctionType; @@ -20,6 +21,7 @@ ol.TileUrlFunctionType; ol.TileUrlFunction.createFromTemplate = function(template) { return ( /** + * @this {ol.source.ImageTileSource} * @param {ol.TileCoord} tileCoord Tile Coordinate. * @param {ol.Projection} projection Projection. * @return {string|undefined} Tile URL. @@ -56,6 +58,7 @@ ol.TileUrlFunction.createFromTileUrlFunctions = function(tileUrlFunctions) { } return ( /** + * @this {ol.source.ImageTileSource} * @param {ol.TileCoord} tileCoord Tile Coordinate. * @param {ol.Projection} projection Projection. * @return {string|undefined} Tile URL. @@ -84,6 +87,7 @@ ol.TileUrlFunction.createFromParamsFunction = var tmpExtent = ol.extent.createEmpty(); return ( /** + * @this {ol.source.ImageTileSource} * @param {ol.TileCoord} tileCoord Tile Coordinate. * @param {ol.Projection} projection Projection. * @return {string|undefined} Tile URL. @@ -106,6 +110,7 @@ ol.TileUrlFunction.createFromParamsFunction = /** + * @this {ol.source.ImageTileSource} * @param {ol.TileCoord} tileCoord Tile coordinate. * @param {ol.Projection} projection Projection. * @return {string|undefined} Tile URL. @@ -126,6 +131,7 @@ ol.TileUrlFunction.withTileCoordTransform = var tmpTileCoord = new ol.TileCoord(0, 0, 0); return ( /** + * @this {ol.source.ImageTileSource} * @param {ol.TileCoord} tileCoord Tile Coordinate. * @param {ol.Projection} projection Projection. * @return {string|undefined} Tile URL.