From cefa35620ea8a838c3d1f2a32afaf72fc3805258 Mon Sep 17 00:00:00 2001 From: junh_eee Date: Thu, 15 Sep 2022 18:04:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=80=EB=8F=84=20=EA=B2=80=EC=83=89=20-=20?= =?UTF-8?q?=EA=B8=B0=EC=B4=88=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basis/flight/plan/FlightPlanAreaMap.js | 53 +++++++++++-------- test/pav-warning.js | 14 +++-- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/src/components/basis/flight/plan/FlightPlanAreaMap.js b/src/components/basis/flight/plan/FlightPlanAreaMap.js index 836760e..8f95e8b 100644 --- a/src/components/basis/flight/plan/FlightPlanAreaMap.js +++ b/src/components/basis/flight/plan/FlightPlanAreaMap.js @@ -3,6 +3,7 @@ import { Card, CardBody, Button, + Input } from 'reactstrap'; import { useDispatch, useSelector } from 'react-redux'; import { FeatureAirZone } from '../../../map/naver/feature/FeatureAirZone'; @@ -23,6 +24,7 @@ const FlightPlanAreaMap = (props) => { const [mode, setMode] = useState(); const [mapAreaCoordList, setMapAreaCoordList] = useState(initFlightBas.initDetail.areaList); + const [searchData, setSearchData] = useState(); useEffect(() => { NaverMapInit(); @@ -50,20 +52,6 @@ const FlightPlanAreaMap = (props) => { }, [areaCoordList]); - const search = (latlng) => { - naver.maps.Service.reverseGeocode({ - coords: latlng, - orders: [ - naver.maps.Service.OrderType.ADDR, - naver.maps.Service.OrderType.ROAD_ADDR - ].join(',') - }, ) - } - - - - - const ModeInit = () => { setMode(mapControl.drawType) } @@ -136,6 +124,18 @@ const FlightPlanAreaMap = (props) => { setMapAreaCoordList(areaList); } + const handleSearch = () => { + console.log(searchData, 'encoding') + } + + const handleChange = e => { + const {name, value} = e.target; + + if(name=='searchInput') { + setSearchData(encodeURI(value)); + } + } + return ( @@ -160,13 +160,6 @@ const FlightPlanAreaMap = (props) => { handleConfirm={props.handleConfirm} /> : null} - {/* props.handleConfirm(mapAreaCoordList)} - > - 확인 - */} { > 초기화 + + + 검색 + diff --git a/test/pav-warning.js b/test/pav-warning.js index d98764b..e9b507b 100644 --- a/test/pav-warning.js +++ b/test/pav-warning.js @@ -1,18 +1,21 @@ const {getConnection, writeData} = require("./pav-client") const {getCoordsFormBetweenCoord, dumyData} = require("./pav-utils") -// const host = "192.168.0.24" +const host = "192.168.0.28" // const host = "localhost" -const host = "211.43.13.240" +// const host = "211.43.13.240" const port = 8082 // 기본정보 -const prefix = 'TEST-DRON-W-' +const prefix = 'TEST-DRON-W' const pathSampleCoord = [ [37.5215, 126.6050], [37.5215, 126.6082], - [37.5210, 126.6082], + + // [37.5210, 126.6082], + [37.5210, 126.6182], + [37.5210, 126.6057], [37.5205, 126.6057], [37.5205, 126.6082], @@ -38,7 +41,8 @@ const getCoords = (coords) => { } const getClient = () => { - const dronName = prefix + '001'; + // const dronName = prefix + '001'; + const dronName = prefix + '008'; const client = {}; client.dronName = dronName