fix: move data xyz_link

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
Andrew Calcutt 2024-01-22 16:56:55 -05:00
parent 73a0465afe
commit 6c29c6d7b9

View file

@ -496,6 +496,7 @@ function start(opts) {
const centerPx = mercator.px([center[0], center[1]], center[2]);
data.thumbnail = `${center[2]}/${Math.floor(centerPx[0] / 256)}/${Math.floor(centerPx[1] / 256)}.${tileJSON.format}`;
}
}
const tileSize = undefined;
data.xyz_link = getTileUrls(
@ -509,7 +510,8 @@ function start(opts) {
pbf: options.pbfAlias,
},
)[0];
}
if (data.filesize) {
let suffix = 'kB';
let size = parseInt(tileJSON.filesize, 10) / 1024;
@ -524,6 +526,7 @@ function start(opts) {
data.formatted_filesize = `${size.toFixed(2)} ${suffix}`;
}
console.log(data)
datas[id] = data;
}