fix(SW-1168) Show only hotel cards that are visible on map

This commit is contained in:
Pontus Dreij
2024-12-12 10:04:16 +01:00
parent f5fb64729c
commit c3e56d5b49
6 changed files with 211 additions and 119 deletions

View File

@@ -19,6 +19,7 @@ export default function InteractiveMap({
hotelPins,
mapId,
closeButton,
onMapLoad,
onActivePoiChange,
}: InteractiveMapProps) {
const intl = useIntl()
@@ -47,7 +48,7 @@ export default function InteractiveMap({
return (
<div className={styles.mapContainer}>
<Map {...mapOptions}>
<Map {...mapOptions} onTilesLoaded={onMapLoad}>
{hotelPins && <HotelListingMapContent hotelPins={hotelPins} />}
{pointsOfInterest && (
<HotelMapContent