Feat/SW-1937 destination overview map mobile

* feat(SW-1937): Added gestureHandling prop to be able to scroll past the map on the overview page

* feat(SW-1937): Added active map card on overview page for smaller viewports

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-03-24 07:34:36 +00:00
parent 542e20e69c
commit f93afdbfbf
17 changed files with 197 additions and 59 deletions

View File

@@ -36,6 +36,14 @@ export function useSupercluster<T extends GeoJsonProperties>(
return clusterer.getClusters(bbox, zoom)
}, [version, clusterer, bbox, zoom])
function getClusterZoom(clusterId: number) {
if (!clusterer || version === 0) {
return null
}
return clusterer.getClusterExpansionZoom(clusterId)
}
// retrieve the hotel ids included in the cluster
const containedHotels = clusters.map((cluster) => {
if (cluster.properties?.cluster && typeof cluster.id === "number") {
@@ -47,5 +55,6 @@ export function useSupercluster<T extends GeoJsonProperties>(
return {
clusters,
containedHotels,
getClusterZoom,
}
}