From bd52bbbf5ff68e82a8683daf2fce7ac592ecfb96 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 15 Jun 2026 11:28:17 +0200 Subject: [PATCH] Fix field name --- .../MapStyle/SWRDataLabLight.stories.svelte | 14 +++++++++++++- .../maplibre/MapStyle/components/PlaceLabels.ts | 14 +++++++------- .../src/maplibre/MapStyle/components/Roads.ts | 3 +-- .../src/maplibre/MapStyle/components/Walking.ts | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte index ed855838..c36d317d 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte @@ -279,7 +279,19 @@
- + + + +
+
+
+ + + +
+
+
diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index f692b2f7..baf0e74a 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -76,7 +76,7 @@ export default function makePlaceLabels(tokens) { ['in', 'kind', 'city', 'town'], ['>', 'population', 50_000], ['<', 'population', 100_000], - ['!in', 'name_de', ...majorCities] + ['!in', 'name', ...majorCities] ], minzoom: 8.5, layout: { @@ -96,7 +96,7 @@ export default function makePlaceLabels(tokens) { ['in', 'kind', 'city', 'town'], ['>', 'population', 100_000], ['<', 'population', 400_000], - ['!in', 'name_de', ...majorCities] + ['!in', 'name', ...majorCities] ], minzoom: 7, maxzoom: 13, @@ -115,7 +115,7 @@ export default function makePlaceLabels(tokens) { 'all', ['in', 'kind', 'city', 'town', 'state_capital'], ['>', 'population', 400_000], - ['!in', 'name_de', ...majorCities] + ['!in', 'name', ...majorCities] ], minzoom: 7, maxzoom: 12, @@ -138,7 +138,7 @@ export default function makePlaceLabels(tokens) { }, { id: 'label-place-major-city', - filter: ['in', 'name_de', ...majorCities], + filter: ['in', 'name', ...majorCities], minzoom: 5.5, maxzoom: 12, layout: { @@ -167,7 +167,7 @@ export default function makePlaceLabels(tokens) { layout: { 'text-font': tokens.sans_regular, 'text-letter-spacing': 0.01, - 'text-field': '{name_de}', + 'text-field': '{name}', ...el.layout }, @@ -187,12 +187,12 @@ export default function makePlaceLabels(tokens) { filter: [ 'all', ['==', 'admin_level', 2], - ['!in', 'name_de', 'Jersey', 'Guernsey', 'Insel Man'] + ['!in', 'name', 'Jersey', 'Guernsey', 'Insel Man'] ], minzoom: 4, maxzoom: 8, layout: { - 'text-field': '{name_de}', + 'text-field': '{name}', 'text-letter-spacing': 0.02, 'text-font': tokens.sans_regular, 'text-size': { diff --git a/components/src/maplibre/MapStyle/components/Roads.ts b/components/src/maplibre/MapStyle/components/Roads.ts index 1d04ab3b..d1caa456 100644 --- a/components/src/maplibre/MapStyle/components/Roads.ts +++ b/components/src/maplibre/MapStyle/components/Roads.ts @@ -276,11 +276,10 @@ export default function makeRoads(tokens) { 'source-layer': 'street_labels', ...el, layout: { - 'text-field': '{name_de}', + 'text-field': '{name}', 'text-font': tokens.sans_regular, 'symbol-placement': 'line', 'text-anchor': 'center', - ...el.layout }, paint: { diff --git a/components/src/maplibre/MapStyle/components/Walking.ts b/components/src/maplibre/MapStyle/components/Walking.ts index 1fb4cea7..ccfe9310 100644 --- a/components/src/maplibre/MapStyle/components/Walking.ts +++ b/components/src/maplibre/MapStyle/components/Walking.ts @@ -1165,7 +1165,7 @@ export default function makeWalking(tokens): any { filter: ['==', 'kind', 'pedestrian'], minzoom: 14, layout: { - 'text-field': '{name_de}', + 'text-field': '{name}', 'text-font': tokens.sans_regular, 'symbol-placement': 'line', 'text-anchor': 'center',