From 3d20dc671e796360f2cb1305d527706028441aa2 Mon Sep 17 00:00:00 2001 From: schererleander Date: Mon, 29 Dec 2025 01:04:19 +0100 Subject: feat(map): local pmaptiles instead of carto --- public/natural-earth.pmtiles | Bin 0 -> 104266420 bytes public/style-dark.json | 187 +++++++++++++++++++++++++++++++++++++++++++ public/style-light.json | 187 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 public/natural-earth.pmtiles create mode 100644 public/style-dark.json create mode 100644 public/style-light.json (limited to 'public') diff --git a/public/natural-earth.pmtiles b/public/natural-earth.pmtiles new file mode 100644 index 0000000..c5c2a63 Binary files /dev/null and b/public/natural-earth.pmtiles differ diff --git a/public/style-dark.json b/public/style-dark.json new file mode 100644 index 0000000..1c8494b --- /dev/null +++ b/public/style-dark.json @@ -0,0 +1,187 @@ +{ + "version": 8, + "name": "Natural Earth (shadcn dark)", + "glyphs": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf", + "sources": { + "ne": { + "type": "vector", + "url": "pmtiles:///natural-earth.pmtiles", + "attribution": "Natural Earth" + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#000000" + } + }, + { + "id": "countries-fill", + "type": "fill", + "source": "ne", + "source-layer": "ne_10m_admin_0_countries", + "paint": { + "fill-color": "#0f0f10", + "fill-opacity": 1 + } + }, + { + "id": "countries-outline", + "type": "line", + "source": "ne", + "source-layer": "ne_10m_admin_0_boundary_lines_land", + "paint": { + "line-color": "#2a2a2e", + "line-opacity": 0.8, + "line-width": ["interpolate", ["linear"], ["zoom"], 0, 0.35, 3, 0.7, 6, 1.1, 8, 1.6] + } + }, + { + "id": "country-labels-major", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_admin_0_countries", + "minzoom": 0, + "maxzoom": 4, + "filter": ["<=", ["get", "SCALERANK"], ["step", ["zoom"], 2, 1, 3, 2, 4, 3, 5]], + "layout": { + "text-field": ["coalesce", ["get", "NAME_EN"], ["get", "NAME"]], + "text-font": ["Noto Sans Regular"], + "text-transform": "uppercase", + "text-letter-spacing": 0.08, + "text-size": ["interpolate", ["linear"], ["zoom"], 0, 10, 2, 12, 4, 14], + "symbol-placement": "point", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#d6d6d6", + "text-halo-color": "#000000", + "text-halo-width": 1.4, + "text-opacity": 0.9 + } + }, + { + "id": "country-labels-minor", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_admin_0_countries", + "minzoom": 2, + "filter": ["<=", ["get", "SCALERANK"], ["step", ["zoom"], 3, 3, 5, 4, 7, 5, 9]], + "layout": { + "text-field": ["coalesce", ["get", "NAME_EN"], ["get", "NAME"]], + "text-font": ["Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 2, 9, 4, 11, 6, 12], + "symbol-placement": "point", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#b7b7b7", + "text-halo-color": "#000000", + "text-halo-width": 1.25, + "text-opacity": 0.85 + } + }, + { + "id": "continents", + "type": "symbol", + "source": "ne", + "source-layer": "continents", + "minzoom": 0, + "maxzoom": 3, + "layout": { + "text-field": ["get", "NAME"], + "text-font": ["Noto Sans Regular"], + "text-transform": "uppercase", + "text-letter-spacing": 0.14, + "text-size": ["interpolate", ["linear"], ["zoom"], 0, 12, 1, 14, 2, 16, 3, 18], + "text-allow-overlap": true, + "text-ignore-placement": true + }, + "paint": { + "text-color": "#8a8a90", + "text-halo-color": "#000000", + "text-halo-width": 1.8, + "text-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.65, 1, 0.7, 2, 0.45, 3, 0] + } + }, + { + "id": "capitals", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_capitals", + "minzoom": 1.5, + "layout": { + "text-field": ["coalesce", ["get", "NAME_EN"], ["get", "NAME"], ["get", "NAMEASCII"]], + "text-font": ["Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 0, 11, 2, 12, 4, 14, 8, 16], + "text-anchor": "top", + "text-offset": [0, 0.6], + "symbol-sort-key": 30, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#ffffff", + "text-halo-color": "#000000", + "text-halo-width": 1.4, + "text-opacity": ["interpolate", ["linear"], ["zoom"], 1.5, 0, 2, 0.98, 8, 0.98] + } + }, + { + "id": "roads", + "type": "line", + "source": "ne", + "source-layer": "ne_10m_roads", + "minzoom": 4, + "paint": { + "line-color": "#ffffff", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 3.9, 0, 4, 0, 4.5, 0.25, 5, 0.55, 8, 0.55], + "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.2, 6, 0.7, 8, 1.8] + } + }, + { + "id": "railroads", + "type": "line", + "source": "ne", + "source-layer": "ne_10m_railroads", + "minzoom": 4, + "paint": { + "line-color": "#b3b3b3", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 3.9, 0, 4, 0, 4.5, 0.2, 5, 0.45, 8, 0.45], + "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.15, 6, 0.5, 8, 1.2], + "line-dasharray": [2, 2] + } + }, + { + "id": "places", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_populated_places", + "minzoom": 2, + "filter": [ + "all", + ["!=", ["get", "ADM0CAP"], 1], + [ + "<=", + ["get", "SCALERANK"], + ["step", ["zoom"], 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8] + ] + ], + "layout": { + "text-field": ["coalesce", ["get", "NAME"], ["get", "NAME_EN"], ["get", "NAMEASCII"]], + "text-font": ["Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 2, 10, 4, 12, 8, 15], + "text-anchor": "top", + "text-offset": [0, 0.6], + "text-allow-overlap": false + }, + "paint": { + "text-color": "#ffffff", + "text-halo-color": "#000000", + "text-halo-width": 1.25, + "text-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0, 2.5, 0.35, 3, 0.95, 8, 0.95] + } + } + ] +} diff --git a/public/style-light.json b/public/style-light.json new file mode 100644 index 0000000..676a214 --- /dev/null +++ b/public/style-light.json @@ -0,0 +1,187 @@ +{ + "version": 8, + "name": "Natural Earth (shadcn light)", + "glyphs": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf", + "sources": { + "ne": { + "type": "vector", + "url": "pmtiles://build/all.pmtiles", + "attribution": "Natural Earth" + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#ffffff" + } + }, + { + "id": "countries-fill", + "type": "fill", + "source": "ne", + "source-layer": "ne_10m_admin_0_countries", + "paint": { + "fill-color": "#ffffff", + "fill-opacity": 1 + } + }, + { + "id": "countries-outline", + "type": "line", + "source": "ne", + "source-layer": "ne_10m_admin_0_boundary_lines_land", + "paint": { + "line-color": "#cfcfd4", + "line-opacity": 1, + "line-width": ["interpolate", ["linear"], ["zoom"], 0, 0.35, 3, 0.7, 6, 1.1, 8, 1.6] + } + }, + { + "id": "country-labels-major", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_admin_0_countries", + "minzoom": 0, + "maxzoom": 4, + "filter": ["<=", ["get", "SCALERANK"], ["step", ["zoom"], 2, 1, 3, 2, 4, 3, 5]], + "layout": { + "text-field": ["coalesce", ["get", "NAME_EN"], ["get", "NAME"]], + "text-font": ["Noto Sans Regular"], + "text-transform": "uppercase", + "text-letter-spacing": 0.08, + "text-size": ["interpolate", ["linear"], ["zoom"], 0, 10, 2, 12, 4, 14], + "symbol-placement": "point", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#2a2a2e", + "text-halo-color": "#ffffff", + "text-halo-width": 1.4, + "text-opacity": 0.85 + } + }, + { + "id": "country-labels-minor", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_admin_0_countries", + "minzoom": 2, + "filter": ["<=", ["get", "SCALERANK"], ["step", ["zoom"], 3, 3, 5, 4, 7, 5, 9]], + "layout": { + "text-field": ["coalesce", ["get", "NAME_EN"], ["get", "NAME"]], + "text-font": ["Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 2, 9, 4, 11, 6, 12], + "symbol-placement": "point", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#4a4a4f", + "text-halo-color": "#ffffff", + "text-halo-width": 1.25, + "text-opacity": 0.8 + } + }, + { + "id": "continents", + "type": "symbol", + "source": "ne", + "source-layer": "continents", + "minzoom": 0, + "maxzoom": 3, + "layout": { + "text-field": ["get", "NAME"], + "text-font": ["Noto Sans Regular"], + "text-transform": "uppercase", + "text-letter-spacing": 0.14, + "text-size": ["interpolate", ["linear"], ["zoom"], 0, 12, 1, 14, 2, 16, 3, 18], + "text-allow-overlap": true, + "text-ignore-placement": true + }, + "paint": { + "text-color": "#6a6a70", + "text-halo-color": "#ffffff", + "text-halo-width": 1.8, + "text-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.55, 1, 0.6, 2, 0.4, 3, 0] + } + }, + { + "id": "capitals", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_capitals", + "minzoom": 1.5, + "layout": { + "text-field": ["coalesce", ["get", "NAME_EN"], ["get", "NAME"], ["get", "NAMEASCII"]], + "text-font": ["Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 0, 11, 2, 12, 4, 14, 8, 16], + "text-anchor": "top", + "text-offset": [0, 0.6], + "symbol-sort-key": 30, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#000000", + "text-halo-color": "#ffffff", + "text-halo-width": 1.4, + "text-opacity": ["interpolate", ["linear"], ["zoom"], 1.5, 0, 2, 0.95, 8, 0.95] + } + }, + { + "id": "roads", + "type": "line", + "source": "ne", + "source-layer": "ne_10m_roads", + "minzoom": 4, + "paint": { + "line-color": "#111111", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 3.9, 0, 4, 0, 4.5, 0.25, 5, 0.55, 8, 0.55], + "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.2, 6, 0.7, 8, 1.8] + } + }, + { + "id": "railroads", + "type": "line", + "source": "ne", + "source-layer": "ne_10m_railroads", + "minzoom": 4, + "paint": { + "line-color": "#6b6b6b", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 3.9, 0, 4, 0, 4.5, 0.2, 5, 0.45, 8, 0.45], + "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.15, 6, 0.5, 8, 1.2], + "line-dasharray": [2, 2] + } + }, + { + "id": "places", + "type": "symbol", + "source": "ne", + "source-layer": "ne_10m_populated_places", + "minzoom": 2, + "filter": [ + "all", + ["!=", ["get", "ADM0CAP"], 1], + [ + "<=", + ["get", "SCALERANK"], + ["step", ["zoom"], 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8] + ] + ], + "layout": { + "text-field": ["coalesce", ["get", "NAME"], ["get", "NAME_EN"], ["get", "NAMEASCII"]], + "text-font": ["Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 2, 10, 4, 12, 8, 15], + "text-anchor": "top", + "text-offset": [0, 0.6], + "text-allow-overlap": false + }, + "paint": { + "text-color": "#000000", + "text-halo-color": "#ffffff", + "text-halo-width": 1.25, + "text-opacity": ["interpolate", ["linear"], ["zoom"], 2, 0, 2.5, 0.35, 3, 0.95, 8, 0.95] + } + } + ] +} -- cgit v1.3.1