Skip to content

High performance self-hosted photo and video management solution.

fix(web): Map clustering when zoomed in (#5299)

Daniel Dietzler4684094b9bb5
diff --git a/web/src/lib/components/shared-components/map/map.svelte b/web/src/lib/components/shared-components/map/map.svelte
index 3687d117e1..87a1bd0a1a 100644
--- a/web/src/lib/components/shared-components/map/map.svelte
+++ b/web/src/lib/components/shared-components/map/map.svelte
@@ -87,10 +87,19 @@
</script>
{#await style then style}
- <MapLibre {style} class="h-full" {center} {zoom} attributionControl={false} diffStyleUpdates={true} let:map>
+ <MapLibre
+ {style}
+ class="h-full"
+ {center}
+ {zoom}
+ attributionControl={false}
+ diffStyleUpdates={true}
+ let:map
+ on:load={(event) => event.detail.setMaxZoom(14)}
+ >
<NavigationControl position="top-left" showCompass={!simplified} />
{#if !simplified}
- <GeolocateControl position="top-left" fitBoundsOptions={{ maxZoom: 12 }} />
+ <GeolocateControl position="top-left" />
<FullscreenControl position="top-left" />
<ScaleControl />
<AttributionControl compact={false} />
@@ -110,7 +119,7 @@
}),
}}
id="geojson"
- cluster={{ maxZoom: 14, radius: 500 }}
+ cluster={{ radius: 500 }}
>
<MarkerLayer
applyToClusters