diff --git a/externs/olx.js b/externs/olx.js index 3eb5418644..a8cf96edab 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -3943,7 +3943,12 @@ olx.source.BingMapsOptions.prototype.reprojectionErrorThreshold; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -4167,7 +4172,12 @@ olx.source.TileImageOptions.prototype.tileGrid; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -4313,7 +4323,13 @@ olx.source.VectorTileOptions.prototype.tileGrid; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(tile, url) { + * tile.setLoader( + * ol.featureloader.tile(url, tile.getFormat())); + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -4494,7 +4510,12 @@ olx.source.MapQuestOptions.prototype.reprojectionErrorThreshold; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -4595,7 +4616,12 @@ olx.source.OSMOptions.prototype.reprojectionErrorThreshold; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -5000,7 +5026,12 @@ olx.source.StamenOptions.prototype.reprojectionErrorThreshold; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -5188,7 +5219,12 @@ olx.source.TileArcGISRestOptions.prototype.reprojectionErrorThreshold; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -5275,7 +5311,12 @@ olx.source.TileJSONOptions.prototype.reprojectionErrorThreshold; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -5428,7 +5469,12 @@ olx.source.TileWMSOptions.prototype.serverType; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -5762,7 +5808,12 @@ olx.source.WMTSOptions.prototype.maxZoom; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ @@ -5876,7 +5927,12 @@ olx.source.XYZOptions.prototype.tileGrid; /** - * Optional function to load a tile given a URL. + * Optional function to load a tile given a URL. The default is + * ```js + * function(imageTile, src) { + * imageTile.getImage().src = src; + * }; + * ``` * @type {ol.TileLoadFunctionType|undefined} * @api */ diff --git a/src/ol/tileloadfunction.js b/src/ol/tileloadfunction.js index 37f3e0d8f5..0a476ae6b3 100644 --- a/src/ol/tileloadfunction.js +++ b/src/ol/tileloadfunction.js @@ -1,22 +1,11 @@ goog.provide('ol.TileLoadFunctionType'); -goog.provide('ol.TileVectorLoadFunctionType'); /** - * A function that takes an {@link ol.Tile} for the tile and a - * `{string}` for the url as arguments. + * A function that takes an {@link ol.Tile} for the tile and a `{string}` for + * the url as arguments. * * @typedef {function(ol.Tile, string)} * @api */ ol.TileLoadFunctionType; - - -/** - * A function that is called with a tile url for the features to load and - * a callback that takes the loaded features as argument. - * - * @typedef {function(string, function(Array.))} - * @api - */ -ol.TileVectorLoadFunctionType;