Merged in feat/SW-2901-hotel-pins (pull request #2206)
feat(SW-2901): add dynamic hotel markers * feat(SW-2901): add dynamic hotel markers * fix(SW-2901): update type Approved-by: Christian Andolf Approved-by: Erik Tiekstra
This commit is contained in:
@@ -7,8 +7,8 @@ import { useIntl } from "react-intl"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
|
||||
import HotelMarkerByType from "../../Markers"
|
||||
import PoiMarker from "../../Markers/Poi"
|
||||
import ScandicMarker from "../../Markers/Scandic"
|
||||
|
||||
import styles from "./poiMapMarkers.module.css"
|
||||
|
||||
@@ -19,6 +19,7 @@ export default function PoiMapMarkers({
|
||||
pointsOfInterest,
|
||||
onActivePoiChange,
|
||||
activePoi,
|
||||
markerInfo,
|
||||
}: PoiMapMarkersProps) {
|
||||
const intl = useIntl()
|
||||
|
||||
@@ -28,7 +29,10 @@ export default function PoiMapMarkers({
|
||||
return (
|
||||
<>
|
||||
<AdvancedMarker position={coordinates} zIndex={1}>
|
||||
<ScandicMarker />
|
||||
<HotelMarkerByType
|
||||
hotelId={markerInfo.hotelId}
|
||||
hotelType={markerInfo.hotelType}
|
||||
/>
|
||||
</AdvancedMarker>
|
||||
|
||||
{pointsOfInterest.map((poi) => (
|
||||
|
||||
@@ -22,6 +22,7 @@ export default function InteractiveMap({
|
||||
hotelPins,
|
||||
mapId,
|
||||
closeButton,
|
||||
markerInfo,
|
||||
fitBounds = true,
|
||||
onTilesLoaded,
|
||||
onActivePoiChange,
|
||||
@@ -67,12 +68,13 @@ export default function InteractiveMap({
|
||||
<div className={styles.mapContainer}>
|
||||
<Map {...mapOptions} onTilesLoaded={onTilesLoaded}>
|
||||
{hotelPins && <HotelListingMapContent hotelPins={hotelPins} />}
|
||||
{pointsOfInterest && (
|
||||
{pointsOfInterest && markerInfo && (
|
||||
<PoiMapMarkers
|
||||
coordinates={coordinates}
|
||||
pointsOfInterest={pointsOfInterest}
|
||||
onActivePoiChange={onActivePoiChange}
|
||||
activePoi={activePoi}
|
||||
markerInfo={markerInfo}
|
||||
/>
|
||||
)}
|
||||
</Map>
|
||||
|
||||
Reference in New Issue
Block a user