feat(map): Leaflet → MapLibre GL JS + deck.gl 전환 (Phase 6) #49
@ -5,7 +5,7 @@ import { PathLayer, ScatterplotLayer } from '@deck.gl/layers'
|
|||||||
import type { StyleSpecification } from 'maplibre-gl'
|
import type { StyleSpecification } from 'maplibre-gl'
|
||||||
import 'maplibre-gl/dist/maplibre-gl.css'
|
import 'maplibre-gl/dist/maplibre-gl.css'
|
||||||
import type { ScatSegment } from './scatTypes'
|
import type { ScatSegment } from './scatTypes'
|
||||||
import { esiColor, jejuCoastCoords, scatDetailData } from './scatConstants'
|
import { esiColor, jejuCoastCoords } from './scatConstants'
|
||||||
import { hexToRgba } from '@common/components/map/mapUtils'
|
import { hexToRgba } from '@common/components/map/mapUtils'
|
||||||
|
|
||||||
const BASE_STYLE: StyleSpecification = {
|
const BASE_STYLE: StyleSpecification = {
|
||||||
@ -102,7 +102,7 @@ function ScatMap({ segments, selectedSeg, onSelectSeg, onOpenPopup }: ScatMapPro
|
|||||||
const handleClick = useCallback(
|
const handleClick = useCallback(
|
||||||
(seg: ScatSegment) => {
|
(seg: ScatSegment) => {
|
||||||
onSelectSeg(seg)
|
onSelectSeg(seg)
|
||||||
onOpenPopup(seg.id % scatDetailData.length)
|
onOpenPopup(seg.id)
|
||||||
},
|
},
|
||||||
[onSelectSeg, onOpenPopup],
|
[onSelectSeg, onOpenPopup],
|
||||||
)
|
)
|
||||||
|
|||||||
@ -11,4 +11,11 @@ export default defineConfig({
|
|||||||
'@tabs': path.resolve(__dirname, 'src/tabs'),
|
'@tabs': path.resolve(__dirname, 'src/tabs'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
// deck.gl → @loaders.gl/worker-utils가 Node.js child_process를 참조하나
|
||||||
|
// 브라우저에서는 해당 코드 경로를 타지 않으므로 undefined shim 허용
|
||||||
|
shimMissingExports: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user