From 8e7691b7b77171b8950fcfabd3be892801ef324c Mon Sep 17 00:00:00 2001 From: hhjk00 Date: Thu, 21 Sep 2023 18:00:04 +0900 Subject: [PATCH] =?UTF-8?q?uam=20=EB=85=B8=EC=84=A0=20waypoint=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/geojson/uamAirArea.json | 619 ++++++++++++++++++ src/components/map/naver/NaverMap.js | 5 +- .../map/naver/feature/FeatureAirZone.js | 17 +- 3 files changed, 638 insertions(+), 3 deletions(-) create mode 100644 src/components/map/geojson/uamAirArea.json diff --git a/src/components/map/geojson/uamAirArea.json b/src/components/map/geojson/uamAirArea.json new file mode 100644 index 0000000..5918281 --- /dev/null +++ b/src/components/map/geojson/uamAirArea.json @@ -0,0 +1,619 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [126.6243464, 37.5642352, 0], + [126.627865, 37.57291277777778, 0], + [126.63130833333331, 37.574488333333335, 0], + [126.64792694444445, 37.57170861111112, 0], + [126.66070861111113, 37.57284000000001, 0], + [126.71217305555557, 37.571181388888895, 0], + [126.72323666666666, 37.55760305555555, 0], + [126.74221777777778, 37.551310277777766, 0], + [126.75231583333333, 37.552930555555555, 0], + [126.75556138888886, 37.5517675, 0], + [126.76711666666668, 37.53592416666667, 0], + [126.76253555555556, 37.53282305555555, 0], + [126.74099055555556, 37.54691583333333, 0], + [126.7212813888889, 37.55372722222222, 0], + [126.71090916666664, 37.57002333333334, 0], + [126.66086972222223, 37.57148361111111, 0], + [126.64985499999999, 37.57053277777778, 0], + [126.63398138888893, 37.55547861111111, 0], + [126.62887638888888, 37.55600555555555, 0], + [126.6243464, 37.5642352, 0] + ] + }, + "properties": { + "name": "UAM 실증 노선", + "description": "아라뱃길 노선", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.627865, 37.57291277777778, 0] + }, + "properties": { + "name": "AR001", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.63130833333331, 37.574488333333335, 0] + }, + "properties": { + "name": "AR002", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.64792694444445, 37.57170861111112, 0] + }, + "properties": { + "name": "AR003", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.66070861111113, 37.57284000000001, 0] + }, + "properties": { + "name": "AR004", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.71217305555557, 37.571181388888895, 0] + }, + "properties": { + "name": "AR005", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.72323666666666, 37.55760305555555, 0] + }, + "properties": { + "name": "AR006", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.74221777777778, 37.551310277777766, 0] + }, + "properties": { + "name": "AR007", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.75231583333333, 37.552930555555555, 0] + }, + "properties": { + "name": "AR008", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.75556138888886, 37.5517675, 0] + }, + "properties": { + "name": "AR009", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.76711666666668, 37.53592416666667, 0] + }, + "properties": { + "name": "AR010", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.76253555555556, 37.53282305555555, 0] + }, + "properties": { + "name": "AR011", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.74099055555556, 37.54691583333333, 0] + }, + "properties": { + "name": "AR012", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.7212813888889, 37.55372722222222, 0] + }, + "properties": { + "name": "AR013", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.71090916666664, 37.57002333333334, 0] + }, + "properties": { + "name": "AR014", + "description": "", + "route": "AR" + } + }, + + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.66086972222223, 37.57148361111111, 0] + }, + "properties": { + "name": "AR015", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.64985499999999, 37.57053277777778, 0] + }, + "properties": { + "name": "AR016", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.63398138888893, 37.55547861111111, 0] + }, + "properties": { + "name": "AR017", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.62887638888888, 37.55600555555555, 0] + }, + "properties": { + "name": "AR018", + "description": "", + "route": "AR" + } + }, + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [126.72420416666667, 37.66822861111111, 0], + [126.72130583333335, 37.66335111111111, 0], + [126.79702611111112, 37.61767361111111, 0], + [126.74079222222223, 37.65721194444444, 0] + ] + }, + "properties": { + "name": "UAM 실증 노선", + "description": "한강 노선1", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.72420416666667, 37.66822861111111, 0] + }, + "properties": { + "name": "HG001", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.72130583333335, 37.66335111111111, 0] + }, + "properties": { + "name": "HG002", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.79702611111112, 37.61767361111111, 0] + }, + "properties": { + "name": "HG003", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.74079222222223, 37.65721194444444, 0] + }, + "properties": { + "name": "HG004", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [126.80453805555555, 37.572388333333336, 0], + [126.80991500000003, 37.555640555555556, 0], + [126.81530555555557, 37.554041388888876, 0] + ] + }, + "properties": { + "name": "UAM 실증 노선", + "description": "한강 노선2", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.80453805555555, 37.572388333333336, 0] + }, + "properties": { + "name": "HG005", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.80991500000003, 37.555640555555556, 0] + }, + "properties": { + "name": "HG006", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.81530555555557, 37.554041388888876, 0] + }, + "properties": { + "name": "HG007", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [126.92951111111113, 37.535757499999995, 0], + [126.93060138888889, 37.53156861111111, 0], + [126.91214388888889, 37.52405611111111, 0], + [126.91713111111112, 37.52255194444444, 0] + ] + }, + "properties": { + "name": "UAM 실증 노선", + "description": "한강 노선3", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.92951111111113, 37.535757499999995, 0] + }, + "properties": { + "name": "HG008", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.93060138888889, 37.53156861111111, 0] + }, + "properties": { + "name": "HG009", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.91214388888889, 37.52405611111111, 0] + }, + "properties": { + "name": "HG010", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [126.91713111111112, 37.52255194444444, 0] + }, + "properties": { + "name": "HG010", + "description": "", + "route": "HG" + } + }, + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [127.08605444444446, 37.519884166666664, 0], + [127.0841361111111, 37.51934638888889, 0], + [127.07263527777779, 37.51935388888888, 0], + [127.05694444444444, 37.53, 0], + [127.06211527777776, 37.53232277777778, 0], + [127.0720008333333, 37.50237972222222, 0], + [127.09528527777779, 37.49509166666667, 0], + [127.09718083333335, 37.49339055555556, 0], + [127.09813527777777, 37.490587777777776, 0], + [127.1054336111111, 37.48388333333334, 0], + [127.10976999999998, 37.48730472222222, 0], + [127.10070555555555, 37.494905555555555, 0], + [127.07244999999999, 37.50371194444445, 0] + ] + }, + "properties": { + "name": "UAM 실증 노선", + "description": "탄천 노선", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.08605444444446, 37.519884166666664, 0] + }, + "properties": { + "name": "TC001", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.0841361111111, 37.51934638888889, 0] + }, + "properties": { + "name": "TC002", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.07263527777779, 37.51935388888888, 0] + }, + "properties": { + "name": "TC003", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.05694444444444, 37.53, 0] + }, + "properties": { + "name": "TC004", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.06211527777776, 37.53232277777778, 0] + }, + "properties": { + "name": "TC005", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.0720008333333, 37.50237972222222, 0] + }, + "properties": { + "name": "TC006", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.09528527777779, 37.49509166666667, 0] + }, + "properties": { + "name": "TC007", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.09718083333335, 37.49339055555556, 0] + }, + "properties": { + "name": "TC008", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.09813527777777, 37.490587777777776, 0] + }, + "properties": { + "name": "TC009", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.1054336111111, 37.48388333333334, 0] + }, + "properties": { + "name": "TC010", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.10976999999998, 37.48730472222222, 0] + }, + "properties": { + "name": "TC011", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.10070555555555, 37.494905555555555, 0] + }, + "properties": { + "name": "TC012", + "description": "", + "route": "TC" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [127.07244999999999, 37.50371194444445, 0] + }, + "properties": { + "name": "TC013", + "description": "", + "route": "TC" + } + } + ] +} diff --git a/src/components/map/naver/NaverMap.js b/src/components/map/naver/NaverMap.js index 8553a6c..1811e49 100644 --- a/src/components/map/naver/NaverMap.js +++ b/src/components/map/naver/NaverMap.js @@ -4,6 +4,7 @@ import NaverMapControl from './NaverMapControl'; import { FeatureAirZone } from './feature/FeatureAirZone'; import geoJson from '../geojson/airArea.json'; import gimPo from '../geojson/airportAirArea.json'; +import uam from '../geojson/uamAirArea.json'; import NewDronPlan from './dron/NewDronPlan'; import DronToast from './dron/DronToast'; import ControlDraw from './draw/ControlDraw'; @@ -121,7 +122,9 @@ export const NaverCustomMap = () => { let airArea = geoJson.features; let gimPofeatures = gimPo.features; - let features = airArea.concat(gimPofeatures); + let uamAirArea = uam.features; + let features = airArea.concat(gimPofeatures, uamAirArea); + const coords = []; useEffect(() => { NaverMapInit(); diff --git a/src/components/map/naver/feature/FeatureAirZone.js b/src/components/map/naver/feature/FeatureAirZone.js index 1e4d210..b6491a3 100644 --- a/src/components/map/naver/feature/FeatureAirZone.js +++ b/src/components/map/naver/feature/FeatureAirZone.js @@ -81,6 +81,8 @@ export const FeatureAirZone = props => { arrGeoJson.push(item); } else if (item.properties.type === '0006' && mapControl.area0006) { arrGeoJson.push(item); + } else if (item.properties.route) { + arrGeoJson.push(item); } }); @@ -89,6 +91,11 @@ export const FeatureAirZone = props => { props.map.data.setStyle(feature => { var color; + var wayPointIcon = { + content: + '
', + anchor: new naver.maps.Point(10, 5) + }; //0001 비행금지구역 #FF3648 //0002 비행제한구역 #FFA1AA @@ -99,6 +106,7 @@ export const FeatureAirZone = props => { // 공역 색상 변경 const type = feature.getProperty('type'); const name = feature.getProperty('name'); + const route = feature.getProperty('route'); if (type === '0001') { color = '#FF3648'; @@ -114,14 +122,19 @@ export const FeatureAirZone = props => { color = '#009cad'; } else if (name === '김포공항') { color = '#020715'; + } else if (route) { + color = '#FC5DFF'; } return { fillColor: name === '김포공항' ? '#ffffff' : color, opercity: name === '김포공항' ? 0 : 1, strokeColor: color, - strokeWeight: name === '김포공항' ? 1 : 0.7, - icon: null + strokeWeight: name === '김포공항' ? 1 : route ? 3 : 0.7, + icon: route ? wayPointIcon : null, + strokeStyle: route ? 'shortdash' : '', + strokeLineCap: route ? 'round' : '', + strokeLineJoin: route ? 'round' : '' }; });