diff --git a/externs/olx.js b/externs/olx.js index 4a14b6cc79..8528a194f0 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -3950,7 +3950,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 */ @@ -4174,7 +4179,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 */ @@ -4319,7 +4329,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 */ @@ -4500,7 +4516,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 */ @@ -4601,7 +4622,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 */ @@ -5006,7 +5032,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 */ @@ -5194,7 +5225,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 */ @@ -5281,7 +5317,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 */ @@ -5434,7 +5475,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 */ @@ -5768,7 +5814,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 */ @@ -5882,7 +5933,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;