Browse Source

김포공항 공역 격자무늬 추가

pull/2/head
이준희 2 years ago
parent
commit
8787db9dbd
  1. 104
      src/components/map/naver/feature/FeatureAirZone.js

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

@ -121,7 +121,7 @@ export const FeatureAirZone = props => {
// const diff = tt; // const diff = tt;
// const coord1 = new naver.maps.EPSG3857.getDestinationCoord( // const coord1 = new naver.maps.EPSG3857.getDestinationCoord(
// new naver.maps.LatLng(37.558599, 126.797627), // new naver.maps.LatLng(37.558522, 126.793722),
// tt, // tt,
// 9300 // 9300
// ); // );
@ -130,6 +130,108 @@ export const FeatureAirZone = props => {
// } // }
// console.log(coordzip); // console.log(coordzip);
// console.log(tt); // console.log(tt);
const SENSOR_RADIUS = 9300;
const position = new naver.maps.LatLng(37.558522, 126.793722);
const color = '#000';
const opacity = 0.7;
let angle = 0;
for (let i = 0; i < 4; i++) {
angle += 90;
let buffer = 0;
for (let j = 0; j < 4; j++) {
buffer += 2000;
const coord = new naver.maps.EPSG3857.getDestinationCoord(
position,
angle,
buffer
);
let tt = 0;
if (j === 0) {
tt = 218.6;
} else if (j === 1) {
tt = 905.4;
} else if (j === 2) {
tt = 2195;
} else if (j === 3) {
tt = 4560.2;
}
if (angle % 180 == 0) {
const polyES = new naver.maps.Polyline({
path: [
new naver.maps.EPSG3857.getDestinationCoord(
coord,
90,
SENSOR_RADIUS - tt
),
new naver.maps.EPSG3857.getDestinationCoord(
coord,
270,
SENSOR_RADIUS - tt
)
],
strokeWeight: 0.8,
strokeOpacity: opacity,
strokeColor: color,
map: props.map
});
} else {
const polyNS = new naver.maps.Polyline({
path: [
new naver.maps.EPSG3857.getDestinationCoord(
coord,
0,
SENSOR_RADIUS - tt
),
new naver.maps.EPSG3857.getDestinationCoord(
coord,
180,
SENSOR_RADIUS - tt
)
],
strokeWeight: 0.8,
strokeOpacity: opacity,
strokeColor: color,
map: props.map
});
}
}
}
const NS = new naver.maps.Polyline({
path: [
new naver.maps.EPSG3857.getDestinationCoord(position, 0, SENSOR_RADIUS),
new naver.maps.EPSG3857.getDestinationCoord(
position,
180,
SENSOR_RADIUS
)
],
strokeWeight: 0.8,
strokeOpacity: opacity,
strokeColor: color,
map: props.map
});
const ES = new naver.maps.Polyline({
path: [
new naver.maps.EPSG3857.getDestinationCoord(
position,
90,
SENSOR_RADIUS
),
new naver.maps.EPSG3857.getDestinationCoord(
position,
270,
SENSOR_RADIUS
)
],
strokeWeight: 0.8,
strokeOpacity: opacity,
strokeColor: color,
map: props.map
});
}; };
const featureAirEvent = () => { const featureAirEvent = () => {

Loading…
Cancel
Save