Use standard tile coords

This commit is contained in:
Tim Schaub
2018-11-20 15:28:24 -07:00
parent 37c987de0a
commit e9a30c5cb7
29 changed files with 241 additions and 229 deletions

View File

@@ -250,7 +250,7 @@ class BingMaps extends TileImage {
if (!tileCoord) {
return undefined;
} else {
createOrUpdate(tileCoord[0], tileCoord[1], -tileCoord[2] - 1, quadKeyTileCoord);
createOrUpdate(tileCoord[0], tileCoord[1], tileCoord[2], quadKeyTileCoord);
let url = imageUrl;
if (hidpi) {
url += '&dpi=d1&device=mobile';

View File

@@ -121,7 +121,7 @@ class TileDebug extends XYZ {
const textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);
let text;
if (textTileCoord) {
text = 'z:' + textTileCoord[0] + ' x:' + textTileCoord[1] + ' y:' + (-textTileCoord[2] - 1);
text = 'z:' + textTileCoord[0] + ' x:' + textTileCoord[1] + ' y:' + textTileCoord[2];
} else {
text = 'none';
}

View File

@@ -507,7 +507,7 @@ function createFromWMTSTemplate(template) {
const localContext = {
'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),
'TileCol': tileCoord[1],
'TileRow': -tileCoord[2] - 1
'TileRow': tileCoord[2]
};
assign(localContext, dimensions);
let url = template;

View File

@@ -213,7 +213,7 @@ class Zoomify extends TileImage {
} else {
const tileCoordZ = tileCoord[0];
const tileCoordX = tileCoord[1];
const tileCoordY = -tileCoord[2] - 1;
const tileCoordY = tileCoord[2];
const tileIndex =
tileCoordX +
tileCoordY * tierSizeInTiles[tileCoordZ][0];