Skip to content

Commit 3835fc5

Browse files
committed
link to tile metadata
1 parent 37a5171 commit 3835fc5

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{
22
"type": "module",
3-
"scripts": {
4-
"dev": "node --experimental-strip-types --env-file=.env cli/main.ts",
5-
"debug": "node --experimental-strip-types --env-file=.env --inspect-wait cli/main.ts",
6-
"start": "npx eleventy",
7-
"build": "tsc"
8-
},
93
"workspaces": [
104
"cli",
115
"website"

website/_assets/app.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,21 @@ class BuildsInfo extends HTMLElement {
3535
return;
3636
}
3737

38+
const tileAnchor = (name) => {
39+
return `<a href="/tiles/${name}" download="${name}.json">${name}</a>`;
40+
};
41+
42+
const metaAnchor = (pmtiles) => {
43+
const name = pmtiles.replace(/\.pmtiles$/, "");
44+
return `<a href="/tiles/${name}.json" download="${name}.json">metadata</a>`;
45+
};
46+
3847
const builds = data.targets.map(
3948
(target) =>
4049
`<li>
41-
<a href="/tiles/${target.name}" download=${target.name}>${target.name}</a>
50+
${tileAnchor(target.name)}
51+
&ndash;
52+
${metaAnchor(target.name)}
4253
<br>
4354
boundary=${target.bbox.join(",")}
4455
</li>`,

0 commit comments

Comments
 (0)