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: {