Pass transformed tile coordinates to the tileUrlFunction
This commit is contained in:
@@ -165,15 +165,15 @@ ol.tilecoord.wrapX = function(tileCoord, tileGrid, projection) {
|
||||
/**
|
||||
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||
* @param {!ol.tilegrid.TileGrid} tileGrid Tile grid.
|
||||
* @return {ol.TileCoord} Tile coordinate.
|
||||
* @return {boolean} Tile coordinate is within extent and zoom level range.
|
||||
*/
|
||||
ol.tilecoord.restrictByExtentAndZ = function(tileCoord, tileGrid) {
|
||||
ol.tilecoord.withinExtentAndZ = function(tileCoord, tileGrid) {
|
||||
var z = tileCoord[0];
|
||||
var x = tileCoord[1];
|
||||
var y = tileCoord[2];
|
||||
|
||||
if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
var extent = tileGrid.getExtent();
|
||||
var tileRange;
|
||||
@@ -183,8 +183,8 @@ ol.tilecoord.restrictByExtentAndZ = function(tileCoord, tileGrid) {
|
||||
tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
|
||||
}
|
||||
if (goog.isNull(tileRange)) {
|
||||
return tileCoord;
|
||||
return true;
|
||||
} else {
|
||||
return tileRange.containsXY(x, y) ? tileCoord : null;
|
||||
return tileRange.containsXY(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user