cluster selection

This commit is contained in:
2026-07-12 11:19:16 +02:00
parent 9f1104b34f
commit 235cdacf9e
8 changed files with 107 additions and 40 deletions
+3 -1
View File
@@ -33,6 +33,7 @@ await store.fetchData();
const shownClusters = ref<FeatureCollection<Point> | null>(null);
const image = useSvgImage();
const map = useMap("main");
watchEffect(async () => {
const allClusters = [];
for (const routeId of store.selectedRouteIds) {
@@ -47,9 +48,10 @@ watchEffect(async () => {
shownClusters.value = {
type: "FeatureCollection",
features: allClusters
.map((c) => store.clustersById[c.id])
.map((c) => store.clustersByCode[c.code])
.filter((c) => c !== undefined),
};
const firstPoint = shownClusters.value.features[0];
if (!firstPoint) {
map.map?.flyTo({ center, zoom });