From e4b9c3e5dd2b5aac6003365699f035410d73d15f Mon Sep 17 00:00:00 2001 From: "jeonghyo.k" Date: Mon, 6 Apr 2026 22:27:39 +0900 Subject: [PATCH] =?UTF-8?q?refactor(map):=20=EC=A7=80=EB=8F=84=20=ED=95=AD?= =?UTF-8?q?=EC=83=81=20=EB=9D=BC=EC=9D=B4=ED=8A=B8=20=EB=AA=A8=EB=93=9C?= =?UTF-8?q?=EB=A1=9C=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit useBaseMapStyle에서 테마 구독 제거, 항상 LIGHT_STYLE 반환. MapView lightMode를 true로 고정하여 앱 다크 모드와 무관하게 지도는 라이트 모드로 표시. Co-Authored-By: Claude Opus 4.6 --- frontend/src/common/components/map/MapView.tsx | 9 +++++++-- frontend/src/common/hooks/useBaseMapStyle.ts | 6 +----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/common/components/map/MapView.tsx b/frontend/src/common/components/map/MapView.tsx index bc20b7e..2f2431d 100755 --- a/frontend/src/common/components/map/MapView.tsx +++ b/frontend/src/common/components/map/MapView.tsx @@ -17,8 +17,8 @@ import { MeasureOverlay } from './MeasureOverlay' import { useMeasureTool } from '@common/hooks/useMeasureTool' import { hexToRgba } from './mapUtils' import { S57EncOverlay } from './S57EncOverlay' +import { SrOverlay } from './SrOverlay' import { useMapStore } from '@common/store/mapStore' -import { useThemeStore } from '@common/store/themeStore' import { useBaseMapStyle } from '@common/hooks/useBaseMapStyle' const GEOSERVER_URL = import.meta.env.VITE_GEOSERVER_URL || 'http://localhost:8080' @@ -113,6 +113,7 @@ interface MapViewProps { drawingPoints?: BoomLineCoord[] layerOpacity?: number layerBrightness?: number + layerColors?: Record backtrackReplay?: { isActive: boolean ships: ReplayShip[] @@ -306,6 +307,7 @@ export function MapView({ drawingPoints = [], layerOpacity = 50, layerBrightness = 50, + layerColors, backtrackReplay, sensitiveResources = [], sensitiveResourceGeojson, @@ -329,7 +331,7 @@ export function MapView({ analysisCircleRadiusM = 0, showOverlays = true, }: MapViewProps) { - const lightMode = useThemeStore((s) => s.theme) === 'light' + const lightMode = true const { mapToggles, measureMode, measureInProgress, measurements } = useMapStore() const { handleMeasureClick } = useMeasureTool() const isControlled = externalCurrentTime !== undefined @@ -1135,6 +1137,9 @@ export function MapView({ {/* S-57 전자해도 오버레이 (공식 style.json 기반) */} + {/* SR 민감자원 벡터타일 오버레이 */} + + {/* WMS 레이어 */} {wmsLayers.map(layer => ( s.theme); const mapToggles = useMapStore((s) => s.mapToggles); if (mapToggles.s57) return ENC_EMPTY_STYLE; if (mapToggles.threeD) return SATELLITE_3D_STYLE; - if (theme === 'light') return LIGHT_STYLE; - return BASE_STYLE; + return LIGHT_STYLE; }