From 13abc5a90819ba3679653997558da7e3611968a0 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Thu, 22 Jan 2026 10:23:11 +0100 Subject: [PATCH 1/3] Add story --- .../MapStyle/SWRDataLabLight.stories.svelte | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte index 90686e67..3c7bfa00 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte @@ -64,6 +64,28 @@ + + +
+
+ + + +
+
+
+
From b138a8e64e4a87478f86feb0db2b41a9b53ac8ec Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Thu, 22 Jan 2026 10:26:37 +0100 Subject: [PATCH 2/3] Implement feature --- components/src/maplibre/MapStyle/SWRDataLabDark.ts | 2 +- components/src/maplibre/MapStyle/SWRDataLabLight.ts | 2 +- components/src/maplibre/MapStyle/defaultOptions.ts | 3 ++- components/src/maplibre/MapStyle/types.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.ts b/components/src/maplibre/MapStyle/SWRDataLabDark.ts index 2427a45f..8f0e209c 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.ts +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.ts @@ -165,7 +165,7 @@ const style: styleFunction = (opts) => { ...(options.places?.showLabels ? placeLabels : []), // 11. Admin boundary labels - ...boundaryLabels + ...(options.admin?.showLabels ? boundaryLabels : []) ] }; }; diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.ts b/components/src/maplibre/MapStyle/SWRDataLabLight.ts index 91541c9e..4e4a18f8 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.ts +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.ts @@ -164,7 +164,7 @@ const style: styleFunction = (opts) => { ...(options.places?.showLabels ? placeLabels : []), // 11. Admin boundary labels - ...boundaryLabels + ...(options.admin?.showLabels ? boundaryLabels : []) ] }; }; diff --git a/components/src/maplibre/MapStyle/defaultOptions.ts b/components/src/maplibre/MapStyle/defaultOptions.ts index 77800ca5..fc0d4e74 100644 --- a/components/src/maplibre/MapStyle/defaultOptions.ts +++ b/components/src/maplibre/MapStyle/defaultOptions.ts @@ -9,7 +9,8 @@ const opts: StyleOptions = { showLabels: true }, admin: { - show: true + show: true, + showLabels: true } }; diff --git a/components/src/maplibre/MapStyle/types.ts b/components/src/maplibre/MapStyle/types.ts index c8251dab..d392934c 100644 --- a/components/src/maplibre/MapStyle/types.ts +++ b/components/src/maplibre/MapStyle/types.ts @@ -10,6 +10,7 @@ interface StyleOptions { }; admin?: { show?: boolean | AdminLevel[]; + showLabels?: boolean; }; roads?: { showLabels?: boolean; From 1b4c707749faaa66c9979a0d7109edb569849df1 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Thu, 22 Jan 2026 10:28:11 +0100 Subject: [PATCH 3/3] Iterate docs --- components/src/maplibre/MapStyle/SWRDataLabLight.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.mdx b/components/src/maplibre/MapStyle/SWRDataLabLight.mdx index 8282f853..a245def4 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.mdx +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.mdx @@ -89,13 +89,14 @@ interface StyleOptions { enableBuildingExtrusions?: boolean; enableHillshade?: boolean; roads?: { - showLabels?: boolean + showLabels?: boolean; } places?: { - showLabels?: boolean + showLabels?: boolean; } admin?: { - show?: boolean | []AdminLevel + show?: boolean | []AdminLevel; + showLabels: boolean; } } ```