From 8591670fa05e998521ff1ea1125f4fdf6c2c9338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Thu, 21 Dec 2023 14:25:44 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EA=B0=84=EB=9E=B5?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/mapbox/feature/FeatureAirZone.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/map/mapbox/feature/FeatureAirZone.js b/src/components/map/mapbox/feature/FeatureAirZone.js index 7350a2e..0164bb1 100644 --- a/src/components/map/mapbox/feature/FeatureAirZone.js +++ b/src/components/map/mapbox/feature/FeatureAirZone.js @@ -354,11 +354,7 @@ export const FeatureAirZone = props => { // [경도, 위도] -> [{x: 경도, y: 위도}] 포맷팅 const routeLine = routeFeatures .filter(route => route.geometry.type === 'LineString') - .map(line => { - return line.geometry.coordinates.map(p => { - return { x: p[0], y: p[1] }; - }); - }); + .map(line => line.geometry.coordinates.map(([x, y]) => ({ x, y }))); // uam노선 버퍼 좌표 요청 const bufferCreate = async coords => { @@ -370,11 +366,7 @@ export const FeatureAirZone = props => { } ); - const paths = []; - bufferList.map(buffer => { - const path = [buffer.x, buffer.y]; - paths.push(path); - }); + const paths = bufferList.map(buffer => [buffer.x, buffer.y]); const bufferObj = { type: 'Feature', geometry: {