forked from MapComplete/MapComplete
Featuer: add selfhosted version of pmtiles
This commit is contained in:
parent
de74a5dc08
commit
55339435d5
7 changed files with 4543 additions and 11 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue