mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 02:46:47 +01:00
fix(web): Map clustering when zoomed in (#5299)
* raise maxZoom to a value that cannot be reached * set max zoom for the entire map
This commit is contained in:
parent
8a8d3811b9
commit
4684094b9b
1 changed files with 12 additions and 3 deletions
|
@ -87,10 +87,19 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#await style then style}
|
{#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} />
|
<NavigationControl position="top-left" showCompass={!simplified} />
|
||||||
{#if !simplified}
|
{#if !simplified}
|
||||||
<GeolocateControl position="top-left" fitBoundsOptions={{ maxZoom: 12 }} />
|
<GeolocateControl position="top-left" />
|
||||||
<FullscreenControl position="top-left" />
|
<FullscreenControl position="top-left" />
|
||||||
<ScaleControl />
|
<ScaleControl />
|
||||||
<AttributionControl compact={false} />
|
<AttributionControl compact={false} />
|
||||||
|
@ -110,7 +119,7 @@
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
id="geojson"
|
id="geojson"
|
||||||
cluster={{ maxZoom: 14, radius: 500 }}
|
cluster={{ radius: 500 }}
|
||||||
>
|
>
|
||||||
<MarkerLayer
|
<MarkerLayer
|
||||||
applyToClusters
|
applyToClusters
|
||||||
|
|
Loading…
Reference in a new issue