Remove unused ol.TileUrlFunction.createFromParamsFunction
This commit is contained in:
@@ -4,7 +4,6 @@ goog.provide('ol.TileUrlFunctionType');
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.math');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.extent');
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,46 +81,6 @@ ol.TileUrlFunction.createFromTileUrlFunctions = function(tileUrlFunctions) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} baseUrl Base URL (may have query data).
|
||||
* @param {Object.<string,*>} params Params to encode in the URL.
|
||||
* @param {number} gutter Gutter value.
|
||||
* @param {function(this: ol.source.TileImage, string, Object.<string,*>,
|
||||
* ol.Extent, ol.Size, ol.proj.Projection)} paramsFunction params function.
|
||||
* @return {ol.TileUrlFunctionType} Tile URL function.
|
||||
*/
|
||||
ol.TileUrlFunction.createFromParamsFunction =
|
||||
function(baseUrl, params, gutter, paramsFunction) {
|
||||
var tmpExtent = ol.extent.createEmpty();
|
||||
var tmpSize = [0, 0];
|
||||
return (
|
||||
/**
|
||||
* @this {ol.source.TileImage}
|
||||
* @param {ol.TileCoord} tileCoord Tile Coordinate.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, projection) {
|
||||
if (goog.isNull(tileCoord)) {
|
||||
return undefined;
|
||||
} else {
|
||||
var tileGrid = this.getTileGrid();
|
||||
if (goog.isNull(tileGrid)) {
|
||||
tileGrid = ol.tilegrid.getForProjection(projection);
|
||||
}
|
||||
var tileResolution = tileGrid.getResolution(tileCoord.z);
|
||||
var tileSize = tileGrid.getTileSize(tileCoord.z);
|
||||
tmpSize[0] = tileSize[0] + (2 * gutter);
|
||||
tmpSize[1] = tileSize[1] + (2 * gutter);
|
||||
var extent = tileGrid.getTileCoordExtent(tileCoord, tmpExtent);
|
||||
ol.extent.buffer(extent, tileResolution * gutter, extent);
|
||||
return paramsFunction.call(this, baseUrl, params,
|
||||
extent, tmpSize, projection);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @this {ol.source.TileImage}
|
||||
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||
|
||||
Reference in New Issue
Block a user