Use standard tile coords
This commit is contained in:
@@ -29,15 +29,12 @@ export function createFromTemplate(template, tileGrid) {
|
||||
} else {
|
||||
return template.replace(zRegEx, tileCoord[0].toString())
|
||||
.replace(xRegEx, tileCoord[1].toString())
|
||||
.replace(yRegEx, function() {
|
||||
const y = -tileCoord[2] - 1;
|
||||
return y.toString();
|
||||
})
|
||||
.replace(yRegEx, tileCoord[2].toString())
|
||||
.replace(dashYRegEx, function() {
|
||||
const z = tileCoord[0];
|
||||
const range = tileGrid.getFullTileRange(z);
|
||||
assert(range, 55); // The {-y} placeholder requires a tile grid with extent
|
||||
const y = range.getHeight() + tileCoord[2];
|
||||
const y = range.getHeight() - tileCoord[2] - 1;
|
||||
return y.toString();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user