From 1e44539a5f0c351afca887edf64a294716d58baf Mon Sep 17 00:00:00 2001 From: yejin Date: Thu, 7 May 2026 12:31:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(map):=20=EC=9E=90=EC=82=AC=20=EB=A7=A4?= =?UTF-8?q?=EC=9E=A5=20=EB=B3=84=ED=91=9C=20=ED=91=9C=EC=8B=9C=20=E2=80=94?= =?UTF-8?q?=20'=EA=B8=B0=ED=83=80'=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC?= =?UTF-8?q?=20=ED=86=B5=EA=B3=BC=20+=20=ED=81=AC=EA=B8=B0=2018px=20?= =?UTF-8?q?=EC=B6=95=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit backend/src/main.py (_collect_same_brand_locations): - 옵션 A 카테고리 매칭 룰 완화 — kakao_store.category="기타" (분류 누락) 매장 통과 - 한신포차 같이 brand 매칭은 정확하지만 카테고리 미지정 케이스 해결 - misalign 차단(메가커피 vs 치킨 시뮬) 의도는 유지 frontend MarketMap.tsx: - 별표 마커 크기 통일 18×18px (font 10) — 이전 디버그 확대(36px) 정리 - Layer 2 (competitors 자사 매칭) + Layer 3 (sameBrandLocations) 동일 사이즈 Co-Authored-By: Claude Opus 4.7 (1M context) --- backend/src/main.py | 16 +++++++++++----- .../SimulationResult/sections/MarketMap.tsx | 7 +++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/backend/src/main.py b/backend/src/main.py index 0ec6bafb..03b02f90 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -6,6 +6,7 @@ if _sys.platform == "win32": import asyncio as _asyncio + _asyncio.set_event_loop_policy(_asyncio.WindowsSelectorEventLoopPolicy()) import asyncio @@ -785,11 +786,16 @@ async def _collect_same_brand_locations( if s.get("dong_name") not in target_set: _stats["dong_drop"] += 1 continue - # 옵션 A: target_category 지정 시 매장 category 일치 필수. - # target_category 미지정 (구버전 또는 admin 등) 시 필터 비활성. - if target_category is not None and s.get("category") != target_category: - _stats["cat_drop"] += 1 - continue + # 옵션 A: target_category 지정 시 매장 category 일치 필수 — misalign 차단용 + # (메가커피 계정이 치킨 시뮬 돌리면 자사 매장 0개). + # 단 "기타" 는 카카오 분류 누락 케이스 (브랜드 명확하지만 category 미지정). + # brand 매칭으로 이미 정확히 골라진 매장이라 통과시킴 (cat misalign 아님). + # target_category 미지정 (구버전 또는 admin) 시 필터 비활성. + if target_category is not None: + store_cat = s.get("category") or "" + if store_cat != target_category and store_cat != "기타": + _stats["cat_drop"] += 1 + continue lat_v = s.get("lat") lon_v = s.get("lon") if not lat_v or not lon_v: diff --git a/frontend/src/components/SimulationResult/sections/MarketMap.tsx b/frontend/src/components/SimulationResult/sections/MarketMap.tsx index 5f628c65..81e98aad 100644 --- a/frontend/src/components/SimulationResult/sections/MarketMap.tsx +++ b/frontend/src/components/SimulationResult/sections/MarketMap.tsx @@ -481,7 +481,7 @@ export function MarketMap({ if (isSelfBrand) { // 자사 매장 별표 — Layer 3 sameBrand 마커와 동일 디자인. dot.style.cssText = - 'position:relative;width:24px;height:24px;display:flex;align-items:center;justify-content:center;background:#fbbf24;border:2px solid #ffffff;border-radius:9999px;box-shadow:0 0 8px rgba(251,191,36,0.6);font-size:12px;font-weight:900;color:#1c1917;cursor:pointer;'; + 'position:relative;width:18px;height:18px;display:flex;align-items:center;justify-content:center;background:#fbbf24;border:2px solid #ffffff;border-radius:9999px;box-shadow:0 0 6px rgba(251,191,36,0.7);font-size:10px;font-weight:900;color:#1c1917;cursor:pointer;'; dot.innerHTML = '★'; dot.title = `${c.brand_name || '자사매장'} · ${c.place_name}`; } else { @@ -547,11 +547,10 @@ export function MarketMap({ return; } const pos = new maps.LatLng(s.lat, s.lng); - // 로고 아이콘 마커 — 금색 동그라미 + 작은 펄스 (자사 매장 표시). + // 로고 아이콘 마커 — 금색 동그라미 (자사 매장 표시). 18px 콤팩트 사이즈. const logo = document.createElement('div'); - // DEBUG: 별표 안 보이는 이슈 — 디자인 강화 (크기↑ + 강한 그림자 + 외곽선 추가). logo.style.cssText = - 'position:relative;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:#fbbf24;border:3px solid #ffffff;border-radius:9999px;box-shadow:0 0 16px rgba(251,191,36,0.95),0 0 4px rgba(0,0,0,0.5);font-size:18px;font-weight:900;color:#1c1917;cursor:pointer;outline:2px solid #f59e0b;outline-offset:1px;'; + 'position:relative;width:18px;height:18px;display:flex;align-items:center;justify-content:center;background:#fbbf24;border:2px solid #ffffff;border-radius:9999px;box-shadow:0 0 6px rgba(251,191,36,0.7);font-size:10px;font-weight:900;color:#1c1917;cursor:pointer;'; logo.innerHTML = '★'; logo.title = `${s.brand_name || '자사매장'} · ${s.place_name}`; logo.addEventListener('click', (ev) => {