From 97728345fd34c6d4179603e37a3674408b6b25de Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Wed, 4 Mar 2026 15:37:45 +0100 Subject: [PATCH 01/10] Implement feature, update stories --- .../MapStyle/SWRDataLabLight.stories.svelte | 4 +++- .../maplibre/Tooltip/Tooltip.stories.svelte | 12 +++++++++--- .../VectorLayer/VectorLayer.stories.svelte | 8 ++++++-- .../VectorTileSource/VectorTileSource.mdx | 2 +- .../VectorTileSource.stories.svelte | 4 +++- .../VectorTileSource/VectorTileSource.svelte | 19 ++++++++++++++----- 6 files changed, 36 insertions(+), 13 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte index 3c7bfa00..0f489ae6 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte @@ -97,7 +97,9 @@ > diff --git a/components/src/maplibre/Tooltip/Tooltip.stories.svelte b/components/src/maplibre/Tooltip/Tooltip.stories.svelte index 106588a6..d53750f8 100644 --- a/components/src/maplibre/Tooltip/Tooltip.stories.svelte +++ b/components/src/maplibre/Tooltip/Tooltip.stories.svelte @@ -33,7 +33,9 @@ > diff --git a/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte b/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte index 91a27177..b3bf47c1 100644 --- a/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte +++ b/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte @@ -19,7 +19,9 @@ - import { type SourceSpecification } from 'maplibre-gl'; + import { type VectorSourceSpecification } from 'maplibre-gl'; import MapSource from '../Source/MapSource.svelte'; interface VectorTileSourceProps { id: string; - url: string; + url?: string; + tiles?: string[]; minZoom?: number; maxZoom?: number; /** @@ -13,11 +14,19 @@ attribution?: string; } - const { minZoom = 0, maxZoom = 24, id, url, attribution = '' }: VectorTileSourceProps = $props(); + const { + minZoom = 0, + maxZoom = 24, + id, + url = '', + tiles = [], + attribution = '' + }: VectorTileSourceProps = $props(); - const sourceSpec: SourceSpecification = { + const sourceSpec: VectorSourceSpecification = { type: 'vector', - tiles: [url], + url, + tiles, maxzoom: maxZoom, minzoom: minZoom, attribution From 53f7bbc900845b87626bde7d149cdd09f8f1033e Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Wed, 4 Mar 2026 16:19:21 +0100 Subject: [PATCH 02/10] Add url parameter story Fails due to upstream bug --- .../VectorTileSource.stories.svelte | 24 +++++++++++++++++++ .../VectorTileSource/VectorTileSource.svelte | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte b/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte index b3bf47c1..f36d1e05 100644 --- a/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte +++ b/components/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte @@ -41,6 +41,30 @@ + + +
+ + + + + +
+
+
+