diff --git a/public/assets/sunny-unlabeled.json b/public/assets/sunny-unlabeled.json index 061e2605b..c2b139673 100644 --- a/public/assets/sunny-unlabeled.json +++ b/public/assets/sunny-unlabeled.json @@ -1731,6 +1731,98 @@ ] } }, + { + "id": "roads_footway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "==", + "pmap:level", + 0 + ], + [ + "in", + "pmap:kind", + "other", + "path" + ], + [ + "==", + "pmap:kind_detail", + "footway" + ] + ], + "paint": { + "line-color": "#d46710", + "line-dasharray": [ + 3, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_cycleway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "==", + "pmap:level", + 0 + ], + [ + "in", + "pmap:kind", + "other", + "path" + ], + [ + "==", + "pmap:kind_detail", + "cycleway" + ] + ], + "paint": { + "line-color": "#6099c9", + "line-dasharray": [ + 3, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, { "id": "roads_other", "type": "line", @@ -1748,10 +1840,20 @@ "pmap:kind", "other", "path" + ], + [ + "!=", + "pmap:kind_detail", + "cycleway" + ], + [ + "!=", + "pmap:kind_detail", + "footway" ] ], "paint": { - "line-color": "#ebebeb", + "line-color": "#cbbbab", "line-dasharray": [ 3, 1 @@ -2966,6 +3068,53 @@ ] } }, + { + "id": "roads_bridges_cycleway_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + ">", + "pmap:level", + 0 + ], + [ + "in", + "pmap:kind", + "other", + "path" + ], + [ + "==", + "pmap:kind_detail", + "cycleway" + ] + ], + "paint": { + "line-color": "#1069c9", + "line-dasharray": [ + 2, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, { "id": "roads_bridges_other", "type": "line", diff --git a/public/assets/sunny.json b/public/assets/sunny.json index ace41b7f1..c17ef53e4 100644 --- a/public/assets/sunny.json +++ b/public/assets/sunny.json @@ -579,13 +579,14 @@ 0 ] ], - "layout": { - "line-cap": "round" + "layout": { + "line-cap": "round" }, "paint": { "line-color": "#85c2e9", "line-dasharray": [ - 0.75,1.75 + 0.75, + 1.75 ], "line-width": [ "interpolate", @@ -1729,6 +1730,98 @@ ] } }, + { + "id": "roads_footway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "==", + "pmap:level", + 0 + ], + [ + "in", + "pmap:kind", + "other", + "path" + ], + [ + "==", + "pmap:kind_detail", + "footway" + ] + ], + "paint": { + "line-color": "#d46710", + "line-dasharray": [ + 3, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_cycleway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "==", + "pmap:level", + 0 + ], + [ + "in", + "pmap:kind", + "other", + "path" + ], + [ + "==", + "pmap:kind_detail", + "cycleway" + ] + ], + "paint": { + "line-color": "#6099c9", + "line-dasharray": [ + 3, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, { "id": "roads_other", "type": "line", @@ -1746,10 +1839,20 @@ "pmap:kind", "other", "path" + ], + [ + "!=", + "pmap:kind_detail", + "cycleway" + ], + [ + "!=", + "pmap:kind_detail", + "footway" ] ], "paint": { - "line-color": "#ebebeb", + "line-color": "#cbbbab", "line-dasharray": [ 3, 1 @@ -2719,7 +2822,6 @@ ] } }, - { "id": "roads_bridges_highway", "type": "line", @@ -2776,9 +2878,7 @@ 13 ] } - }, - { "id": "roads_bridges_minor", "type": "line", @@ -2873,7 +2973,6 @@ ] } }, - { "id": "roads_bridges_medium", "type": "line", @@ -2915,7 +3014,7 @@ ] } }, - { + { "id": "roads_bridges_major", "type": "line", "source": "protomaps", @@ -2968,7 +3067,53 @@ ] } }, - + { + "id": "roads_bridges_cycleway_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + ">", + "pmap:level", + 0 + ], + [ + "in", + "pmap:kind", + "other", + "path" + ], + [ + "==", + "pmap:kind_detail", + "cycleway" + ] + ], + "paint": { + "line-color": "#1069c9", + "line-dasharray": [ + 2, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, { "id": "roads_bridges_other", "type": "line", @@ -3011,7 +3156,6 @@ ] } }, - { "id": "physical_line_waterway_label", "type": "symbol", diff --git a/scripts/generateSunnyUnlabeled.ts b/scripts/generateSunnyUnlabeled.ts index 6896ec9d1..7ce93f17c 100644 --- a/scripts/generateSunnyUnlabeled.ts +++ b/scripts/generateSunnyUnlabeled.ts @@ -7,14 +7,20 @@ export class GenerateSunnyUnlabeled extends Script { super("Generates 'sunny-unlabeled.json' based on sunny.json") } - async main(args: string[]): Promise { + + generateUnlabeled() { const unlabeled = { "#": "AUTOMATICALLY GENERATED! Do not edit.", ...sunny } unlabeled.name = unlabeled.name + "-unlabeled" unlabeled.layers = sunny.layers.filter( - (l) => l.type !== "symbol" || !l.layout["text-field"] + (l) => l.type !== "symbol" || !l.layout["text-field"], ) writeFileSync("public/assets/sunny-unlabeled.json", JSON.stringify(unlabeled, null, " ")) } + + + async main(args: string[]): Promise { + this.generateUnlabeled() + } } new GenerateSunnyUnlabeled().run()