From 844878ce851c0c58372dce755270f643813c05f3 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Wed, 14 Jan 2026 10:34:44 +0700 Subject: [PATCH] feat(map): add server-side h3 clustering and hover highlight - Add useClusteredNodes composable for fetching clustered nodes - Update CatalogMap to support server-side clustering mode - Add bounds-change event for fetching clusters on map move/zoom - Add hover event to HubCard for marker highlighting - Update hubs/map page to use new clustering system --- app/components/catalog/CatalogMap.vue | 384 +++++++++++++----- app/components/catalog/HubCard.vue | 3 + .../graphql/public/geo-generated.ts | 41 ++ app/composables/useClusteredNodes.ts | 48 +++ app/pages/catalog/hubs/map.vue | 20 +- .../public/geo/GetClusteredNodes.graphql | 24 ++ 6 files changed, 417 insertions(+), 103 deletions(-) create mode 100644 app/composables/useClusteredNodes.ts create mode 100644 graphql/operations/public/geo/GetClusteredNodes.graphql diff --git a/app/components/catalog/CatalogMap.vue b/app/components/catalog/CatalogMap.vue index 10f2ff8..7356cf0 100644 --- a/app/components/catalog/CatalogMap.vue +++ b/app/components/catalog/CatalogMap.vue @@ -17,6 +17,7 @@ diff --git a/graphql/operations/public/geo/GetClusteredNodes.graphql b/graphql/operations/public/geo/GetClusteredNodes.graphql new file mode 100644 index 0000000..385b83f --- /dev/null +++ b/graphql/operations/public/geo/GetClusteredNodes.graphql @@ -0,0 +1,24 @@ +query GetClusteredNodes( + $west: Float! + $south: Float! + $east: Float! + $north: Float! + $zoom: Int! + $transportType: String +) { + clusteredNodes( + west: $west + south: $south + east: $east + north: $north + zoom: $zoom + transportType: $transportType + ) { + id + latitude + longitude + count + expansionZoom + name + } +}