Featuer: add selfhosted version of pmtiles

This commit is contained in:
Pieter Vander Vennet 2025-06-16 14:33:04 +02:00
parent de74a5dc08
commit 55339435d5
7 changed files with 4543 additions and 11 deletions

View file

@ -16,8 +16,21 @@ export class GenerateSunnyUnlabeled extends Script {
writeFileSync("public/assets/sunny-unlabeled.json", JSON.stringify(unlabeled, null, " "))
}
/**
* Generates a variation hosted by api.protomaps
*/
generateHosted() {
const tilesource = "https://api.protomaps.com/tiles/v4/{z}/{x}/{y}.mvt?key=2af8b969a9e8b692"
const hosted = { "#": "AUTOMATICALLY GENERATED! Do not edit.", ...sunny }
delete hosted.sources.protomaps.url
hosted.sources.protomaps["tiles"] = [tilesource]
writeFileSync("public/assets/sunny-hosted.json", JSON.stringify(hosted, null, " "))
}
async main(args: string[]): Promise<void> {
this.generateUnlabeled()
this.generateHosted()
}
}