diff --git a/CHANGELOG.md b/CHANGELOG.md index 2990adc..2c44e9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ ## 2026-06-17 +### ๐ŸŽฏ ํด๋Ÿฌ์Šคํ„ฐ expansion ํ›„ ๋งˆ์ปค ํด๋ฆญ ์‹œ ์žฌ๋ฌถ์ž„ ๋ฐฉ์ง€ (v0.1.66) +- ๊ธฐ์กด: selected ์‹œ ๋ฌด์กฐ๊ฑด zoom 16 โ†’ ํด๋Ÿฌ์Šคํ„ฐ expansion(18)์—์„œ ๋งˆ์ปค ํด๋ฆญํ•˜๋ฉด ๋‹ค์‹œ 16์œผ๋กœ ์ค„์–ด ์žฌ๋ฌถ์ž„ +- ๋ณ€๊ฒฝ: ํ˜„์žฌ zoom โ‰ฅ 16์ด๋ฉด ์œ ์ง€, ๋ฏธ๋งŒ์ด๋ฉด 16์œผ๋กœ (NaverMap morph + GoogleMap setZoom ์กฐ๊ฑด๋ถ€) +- page.tsx์˜ setRegionFlyTo ํ˜ธ์ถœ ์ œ๊ฑฐ โ€” selected useEffect๋กœ ์ผ์›ํ™” (zoom 16 ๊ฐ•์ œ ํšŒํ”ผ) + ### ๐Ÿ› NaverMap ํด๋Ÿฌ์Šคํ„ฐ ํด๋ฆญ ์‹œ ์ค‘์•™ ์ด๋™ fix (v0.1.65) - panTo(์• ๋‹ˆ๋ฉ”์ด์…˜) + setZoom(z, true)(์• ๋‹ˆ๋ฉ”์ด์…˜) ๋‘ ์• ๋‹ˆ๋ฉ”์ด์…˜ ๋™์‹œ ํ˜ธ์ถœ์ด ์„œ๋กœ cancel - ๋‹จ์ผ ์‹๋‹น์€ ์คŒ ๋ณ€ํ™” ์—†์–ด์„œ ์•ˆ ๋ณด์˜€๊ณ , ํด๋Ÿฌ์Šคํ„ฐ๋Š” ์คŒ ํฌ๊ฒŒ ๋ณ€๊ฒฝ โ†’ ์ถฉ๋Œ ๊ฐ€์‹œํ™” diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index e488da7..88c1829 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -385,10 +385,8 @@ export default function Home() { const handleSelectRestaurant = useCallback((r: Restaurant) => { setSelected(r); setShowDetail(true); - // ์ง€๋„๊ฐ€ ์„ ํƒ ์‹๋‹น์œผ๋กœ ์ด๋™/์คŒ์ธ โ€” ๊ฐ์ฒด ์ƒˆ๋กœ ๋งŒ๋“ค์–ด flyTo effect ๋งค๋ฒˆ ํŠธ๋ฆฌ๊ฑฐ - if (r.latitude != null && r.longitude != null) { - setRegionFlyTo({ lat: r.latitude, lng: r.longitude, zoom: 16 }); - } + // selected ๋ณ€๊ฒฝ ์ž์ฒด๊ฐ€ MapView ๋‚ด๋ถ€์˜ useEffect์—์„œ ์ค‘์•™ ์ด๋™์„ ์ฒ˜๋ฆฌ. + // (flyTo๋ฅผ ๊ฐ™์ด setํ•˜๋ฉด ์คŒ 16์œผ๋กœ ๊ฐ•์ œ๋˜์–ด ํด๋Ÿฌ์Šคํ„ฐ expansion ํ›„ ๋งˆ์ปค ํด๋ฆญ ์‹œ ๋‹ค์‹œ ๋ฌถ์ž„) }, []); const handleCloseDetail = useCallback(() => { diff --git a/frontend/src/components/GoogleMapView.tsx b/frontend/src/components/GoogleMapView.tsx index 9ee6cf2..ba03330 100644 --- a/frontend/src/components/GoogleMapView.tsx +++ b/frontend/src/components/GoogleMapView.tsx @@ -163,11 +163,12 @@ function MapContent({ restaurants, selected, onSelectRestaurant, flyTo, activeCh if (flyTo.zoom) map.setZoom(flyTo.zoom); }, [map, flyTo]); - // Pan and zoom to selected restaurant + // Pan and zoom to selected restaurant โ€” ํ˜„์žฌ ์คŒ์ด 16 ์ด์ƒ์ด๋ฉด ์œ ์ง€(ํด๋Ÿฌ์Šคํ„ฐ expansion ํ›„ ์žฌ๋ฌถ์ž„ ๋ฐฉ์ง€) useEffect(() => { if (!map || !selected) return; map.panTo({ lat: selected.latitude, lng: selected.longitude }); - map.setZoom(16); + const currentZoom = map.getZoom() ?? 13; + if (currentZoom < 16) map.setZoom(16); setInfoTarget(selected); }, [map, selected]); diff --git a/frontend/src/components/NaverMapView.tsx b/frontend/src/components/NaverMapView.tsx index 284ff72..f6d44a9 100644 --- a/frontend/src/components/NaverMapView.tsx +++ b/frontend/src/components/NaverMapView.tsx @@ -241,12 +241,15 @@ export default function NaverMapView({ else m.panTo(latlng); }, [flyTo]); - // selected ๋ณ€๊ฒฝ ์‹œ ์ž๋™ ์ค‘์•™ + zoom + // selected ๋ณ€๊ฒฝ ์‹œ ์ž๋™ ์ค‘์•™ โ€” ํ˜„์žฌ ์คŒ์ด 16 ์ด์ƒ์ด๋ฉด ๊ทธ๋Œ€๋กœ, ๋ฏธ๋งŒ์ด๋ฉด 16์œผ๋กœ ํ™•๋Œ€ + // (ํด๋Ÿฌ์Šคํ„ฐ expansion์œผ๋กœ 18๊นŒ์ง€ ๋“ค์–ด๊ฐ„ ์ƒํƒœ์—์„œ ๋งˆ์ปค ํด๋ฆญ ์‹œ ๋‹ค์‹œ 16์œผ๋กœ ์ค„์–ด ํด๋Ÿฌ์Šคํ„ฐ๋ง๋˜๋Š” ๊ฒƒ ๋ฐฉ์ง€) useEffect(() => { const m = mapRef.current; if (!m || !selected || !window.naver?.maps) return; if (selected.latitude == null || selected.longitude == null) return; - m.morph(new window.naver.maps.LatLng(selected.latitude, selected.longitude), 16); + const latlng = new window.naver.maps.LatLng(selected.latitude, selected.longitude); + const targetZoom = Math.max(m.getZoom(), 16); + m.morph(latlng, targetZoom); }, [selected]); // ํด๋Ÿฌ์Šคํ„ฐ ๊ณ„์‚ฐ (bounds/zoom ๋ณ€๊ฒฝ ์‹œ)