From 8787db9dbd182e59c5dde3d68a53c6fc505c5a09 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: Mon, 7 Nov 2022 15:34:32 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B9=80=ED=8F=AC=EA=B3=B5=ED=95=AD=20?= =?UTF-8?q?=EA=B3=B5=EC=97=AD=20=EA=B2=A9=EC=9E=90=EB=AC=B4=EB=8A=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/naver/feature/FeatureAirZone.js | 104 +++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/src/components/map/naver/feature/FeatureAirZone.js b/src/components/map/naver/feature/FeatureAirZone.js index e469d76..be571e5 100644 --- a/src/components/map/naver/feature/FeatureAirZone.js +++ b/src/components/map/naver/feature/FeatureAirZone.js @@ -121,7 +121,7 @@ export const FeatureAirZone = props => { // const diff = tt; // const coord1 = new naver.maps.EPSG3857.getDestinationCoord( - // new naver.maps.LatLng(37.558599, 126.797627), + // new naver.maps.LatLng(37.558522, 126.793722), // tt, // 9300 // ); @@ -130,6 +130,108 @@ export const FeatureAirZone = props => { // } // console.log(coordzip); // 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 = () => {