From a812f1fb4519989de15cfea5817959afbdcc7722 Mon Sep 17 00:00:00 2001 From: JANGHYUNn Date: Thu, 14 Dec 2023 11:30:55 +0900 Subject: [PATCH] =?UTF-8?q?=EB=93=9C=EB=A1=A0=EA=B4=80=EC=A0=9C=20?= =?UTF-8?q?=EC=8B=9C=EC=8A=A4=ED=85=9C=20=ED=97=88=EC=9A=A9=EA=B3=A0?= =?UTF-8?q?=EB=8F=84=20=EC=95=8C=EB=A6=BC=20=EC=A0=95=EB=B3=B4=20=EC=84=A0?= =?UTF-8?q?=ED=98=95,=20=EA=B2=A9=EC=9E=90=20=EC=9D=B4=EC=8A=88=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/mapbox/MapBoxMap.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/map/mapbox/MapBoxMap.js b/src/components/map/mapbox/MapBoxMap.js index eb9ad131..b9ac713f 100644 --- a/src/components/map/mapbox/MapBoxMap.js +++ b/src/components/map/mapbox/MapBoxMap.js @@ -120,22 +120,23 @@ export default function MapBoxMap() { } ) => { // useGeoJson = mapControl.liner - useGeoJson = mapControl.areaType - ? { - ...geoJson, - ...flatGimpo, - features: [...geoJson.features, ...flatGimpo.features] - } - : { - ...geoJson, - ...gimPoGrid, - features: [...geoJson.features, ...gimPoGrid.features] - }; + useGeoJson = + mapControl.areaType === 'linear' + ? { + ...geoJson, + ...flatGimpo, + features: [...geoJson.features, ...flatGimpo.features] + } + : { + ...geoJson, + ...gimPoGrid, + features: [...geoJson.features, ...gimPoGrid.features] + }; if (map.getLayer('maine')) { map.removeLayer('maine'); map.removeSource('maine'); } - + console.log(mapControl.areaType); if (altitudeMarker.length > 0) { altitudeMarker.map(i => { i.remove();