fix(946) Center from town name instead of calculate center
This commit is contained in:
@@ -60,13 +60,20 @@ export default function Sidebar({
|
||||
}
|
||||
}
|
||||
|
||||
function handleMouseEnter(poiName: string) {
|
||||
function handleMouseEnter(poiName: string | undefined) {
|
||||
if (!poiName) return
|
||||
|
||||
if (!isClicking) {
|
||||
onActivePoiChange(poiName)
|
||||
}
|
||||
}
|
||||
|
||||
function handlePoiClick(poiName: string, poiCoordinates: Coordinates) {
|
||||
function handlePoiClick(
|
||||
poiName: string | undefined,
|
||||
poiCoordinates: Coordinates
|
||||
) {
|
||||
if (!poiName || !poiCoordinates) return
|
||||
|
||||
setIsClicking(true)
|
||||
toggleFullScreenSidebar()
|
||||
onActivePoiChange(poiName)
|
||||
|
||||
@@ -113,7 +113,7 @@ export default function DynamicMap({
|
||||
activePoi={activePoi}
|
||||
hotelName={hotelName}
|
||||
pointsOfInterest={pointsOfInterest}
|
||||
onActivePoiChange={setActivePoi}
|
||||
onActivePoiChange={(poi) => setActivePoi(poi ?? null)}
|
||||
coordinates={coordinates}
|
||||
/>
|
||||
<InteractiveMap
|
||||
@@ -121,7 +121,7 @@ export default function DynamicMap({
|
||||
coordinates={coordinates}
|
||||
pointsOfInterest={pointsOfInterest}
|
||||
activePoi={activePoi}
|
||||
onActivePoiChange={setActivePoi}
|
||||
onActivePoiChange={(poi) => setActivePoi(poi ?? null)}
|
||||
mapId={mapId}
|
||||
/>
|
||||
</Dialog>
|
||||
|
||||
Reference in New Issue
Block a user