mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: map (#18399)
This commit is contained in:
parent
53420b7c02
commit
12b7a079c1
2 changed files with 31 additions and 35 deletions
|
|
@ -57,7 +57,7 @@
|
|||
}
|
||||
|
||||
let {
|
||||
mapMarkers = $bindable([]),
|
||||
mapMarkers = $bindable(),
|
||||
showSettings = true,
|
||||
zoom = undefined,
|
||||
center = $bindable(undefined),
|
||||
|
|
@ -210,11 +210,13 @@
|
|||
};
|
||||
|
||||
onMount(async () => {
|
||||
mapMarkers = await loadMapMarkers();
|
||||
if (!mapMarkers) {
|
||||
mapMarkers = await loadMapMarkers();
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
abortController.abort();
|
||||
abortController?.abort();
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
|
|
@ -296,7 +298,7 @@
|
|||
<GeoJSON
|
||||
data={{
|
||||
type: 'FeatureCollection',
|
||||
features: mapMarkers.map((marker) => asFeature(marker)),
|
||||
features: mapMarkers?.map((marker) => asFeature(marker)) ?? [],
|
||||
}}
|
||||
id="geojson"
|
||||
cluster={{ radius: 35, maxZoom: 17 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue