fix: move data xyz_link
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
parent
73a0465afe
commit
6c29c6d7b9
1 changed files with 16 additions and 13 deletions
|
|
@ -496,6 +496,7 @@ function start(opts) {
|
||||||
const centerPx = mercator.px([center[0], center[1]], center[2]);
|
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}`;
|
data.thumbnail = `${center[2]}/${Math.floor(centerPx[0] / 256)}/${Math.floor(centerPx[1] / 256)}.${tileJSON.format}`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const tileSize = undefined;
|
const tileSize = undefined;
|
||||||
data.xyz_link = getTileUrls(
|
data.xyz_link = getTileUrls(
|
||||||
|
|
@ -509,7 +510,8 @@ function start(opts) {
|
||||||
pbf: options.pbfAlias,
|
pbf: options.pbfAlias,
|
||||||
},
|
},
|
||||||
)[0];
|
)[0];
|
||||||
}
|
|
||||||
|
|
||||||
if (data.filesize) {
|
if (data.filesize) {
|
||||||
let suffix = 'kB';
|
let suffix = 'kB';
|
||||||
let size = parseInt(tileJSON.filesize, 10) / 1024;
|
let size = parseInt(tileJSON.filesize, 10) / 1024;
|
||||||
|
|
@ -524,6 +526,7 @@ function start(opts) {
|
||||||
data.formatted_filesize = `${size.toFixed(2)} ${suffix}`;
|
data.formatted_filesize = `${size.toFixed(2)} ${suffix}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(data)
|
||||||
datas[id] = data;
|
datas[id] = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue