From 7789671fbc5cf39bd25b28eb5a34c0a8ec20685d Mon Sep 17 00:00:00 2001 From: joungmin Date: Tue, 16 Jun 2026 05:59:24 +0900 Subject: [PATCH] =?UTF-8?q?feat(map):=20=EC=8B=9D=EB=8B=B9=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=EC=A7=80=EB=8F=84=20=EB=A7=81=ED=81=AC=20=EA=B5=AD?= =?UTF-8?q?=EB=82=B4/=ED=95=B4=EC=99=B8=20=EB=B6=84=EA=B8=B0=20(1=EB=8B=A8?= =?UTF-8?q?=EA=B3=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 좌표 기반 한국 판정 (KR bbox 33~38.7°N, 124~132°E) - 국내: 네이버 지도(/p/search/) primary + Google Maps 보조 - 해외: Google Maps 단독 - 좌표 없으면 region 첫 토큰 fallback 2단계(메인 지도 탭 SDK 분기)는 별도 후속. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 --- CHANGELOG.md | 9 ++++ frontend/src/components/RestaurantDetail.tsx | 44 ++++++++++++++------ 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efb9f1e..61fd2a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ --- +## 2026-06-16 + +### 🗺️ 식당 상세 지도 링크 국내/해외 분기 (v0.1.51) +- 좌표 기반 한국 판정 (WGS84 KR bbox 33~38.7°N, 124~132°E) +- 국내: 네이버 지도 primary + Google Maps 보조 (네이버 URL은 신 도메인 /p/search/) +- 해외: Google Maps 단독 +- 좌표 없으면 region 첫 토큰 fallback (구 데이터 호환) +- frontend-only 배포 + ## 2026-06-15 ### 🐛 캐치테이블 URL 패턴 수정 (v0.1.50) diff --git a/frontend/src/components/RestaurantDetail.tsx b/frontend/src/components/RestaurantDetail.tsx index 06b28d6..790df49 100644 --- a/frontend/src/components/RestaurantDetail.tsx +++ b/frontend/src/components/RestaurantDetail.tsx @@ -24,6 +24,15 @@ function buildSearchQuery(r: Restaurant): string { return r.name; } +// 좌표 기반 한국 판정 (WGS84). KR bbox 대략 33~38.7°N, 124~132°E. +// 좌표 없으면 region 첫 토큰으로 fallback (구 데이터 호환). +function isKoreaRestaurant(r: Restaurant): boolean { + if (r.latitude != null && r.longitude != null) { + return r.latitude >= 33 && r.latitude <= 38.7 && r.longitude >= 124 && r.longitude <= 132; + } + return !r.region || r.region.split("|")[0] === "한국"; +} + export default function RestaurantDetail({ restaurant, onClose, @@ -138,22 +147,33 @@ export default function RestaurantDetail({ )} {restaurant.google_place_id && (

- - Google Maps에서 보기 - - {(!restaurant.region || restaurant.region.split("|")[0] === "한국") && ( + {isKoreaRestaurant(restaurant) ? ( + <> + + 네이버 지도에서 보기 + + + Google Maps + + + ) : ( - 네이버 지도에서 보기 + Google Maps에서 보기 )}