Browse Source

uam 노선 waypoint 적용

master
hhjk00 1 year ago
parent
commit
8e7691b7b7
  1. 619
      src/components/map/geojson/uamAirArea.json
  2. 5
      src/components/map/naver/NaverMap.js
  3. 17
      src/components/map/naver/feature/FeatureAirZone.js

619
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"
}
}
]
}

5
src/components/map/naver/NaverMap.js

@ -4,6 +4,7 @@ import NaverMapControl from './NaverMapControl';
import { FeatureAirZone } from './feature/FeatureAirZone'; import { FeatureAirZone } from './feature/FeatureAirZone';
import geoJson from '../geojson/airArea.json'; import geoJson from '../geojson/airArea.json';
import gimPo from '../geojson/airportAirArea.json'; import gimPo from '../geojson/airportAirArea.json';
import uam from '../geojson/uamAirArea.json';
import NewDronPlan from './dron/NewDronPlan'; import NewDronPlan from './dron/NewDronPlan';
import DronToast from './dron/DronToast'; import DronToast from './dron/DronToast';
import ControlDraw from './draw/ControlDraw'; import ControlDraw from './draw/ControlDraw';
@ -121,7 +122,9 @@ export const NaverCustomMap = () => {
let airArea = geoJson.features; let airArea = geoJson.features;
let gimPofeatures = gimPo.features; let gimPofeatures = gimPo.features;
let features = airArea.concat(gimPofeatures); let uamAirArea = uam.features;
let features = airArea.concat(gimPofeatures, uamAirArea);
const coords = []; const coords = [];
useEffect(() => { useEffect(() => {
NaverMapInit(); NaverMapInit();

17
src/components/map/naver/feature/FeatureAirZone.js

@ -81,6 +81,8 @@ export const FeatureAirZone = props => {
arrGeoJson.push(item); arrGeoJson.push(item);
} else if (item.properties.type === '0006' && mapControl.area0006) { } else if (item.properties.type === '0006' && mapControl.area0006) {
arrGeoJson.push(item); arrGeoJson.push(item);
} else if (item.properties.route) {
arrGeoJson.push(item);
} }
}); });
@ -89,6 +91,11 @@ export const FeatureAirZone = props => {
props.map.data.setStyle(feature => { props.map.data.setStyle(feature => {
var color; var color;
var wayPointIcon = {
content:
'<div style="width: 15px; height: 15px; background-color: white; border: 1px solid; border-radius: 50%;"></div>',
anchor: new naver.maps.Point(10, 5)
};
//0001 비행금지구역 #FF3648 //0001 비행금지구역 #FF3648
//0002 비행제한구역 #FFA1AA //0002 비행제한구역 #FFA1AA
@ -99,6 +106,7 @@ export const FeatureAirZone = props => {
// 공역 색상 변경 // 공역 색상 변경
const type = feature.getProperty('type'); const type = feature.getProperty('type');
const name = feature.getProperty('name'); const name = feature.getProperty('name');
const route = feature.getProperty('route');
if (type === '0001') { if (type === '0001') {
color = '#FF3648'; color = '#FF3648';
@ -114,14 +122,19 @@ export const FeatureAirZone = props => {
color = '#009cad'; color = '#009cad';
} else if (name === '김포공항') { } else if (name === '김포공항') {
color = '#020715'; color = '#020715';
} else if (route) {
color = '#FC5DFF';
} }
return { return {
fillColor: name === '김포공항' ? '#ffffff' : color, fillColor: name === '김포공항' ? '#ffffff' : color,
opercity: name === '김포공항' ? 0 : 1, opercity: name === '김포공항' ? 0 : 1,
strokeColor: color, strokeColor: color,
strokeWeight: name === '김포공항' ? 1 : 0.7, strokeWeight: name === '김포공항' ? 1 : route ? 3 : 0.7,
icon: null icon: route ? wayPointIcon : null,
strokeStyle: route ? 'shortdash' : '',
strokeLineCap: route ? 'round' : '',
strokeLineJoin: route ? 'round' : ''
}; };
}); });

Loading…
Cancel
Save