From 31251e6e94ee0d83b6b30181b19f9e0996194f92 Mon Sep 17 00:00:00 2001 From: junh_eee Date: Mon, 19 Sep 2022 17:35:13 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=ED=96=89=EA=B3=84=ED=9A=8D=EC=84=9C?= =?UTF-8?q?=20=EC=A7=80=EB=8F=84=20=EA=B2=80=EC=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/custom.css | 19 ++-- .../basis/flight/plan/FlightPlanAreaMap.js | 102 ++++++++++++++---- 2 files changed, 95 insertions(+), 26 deletions(-) diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css index 72230ff..8203d3a 100644 --- a/src/assets/css/custom.css +++ b/src/assets/css/custom.css @@ -252,12 +252,6 @@ h1.logo span{display:block;color:#f4f4f4;font-weight:bold;letter-spacing:2px;fon .measure-control{position:absolute; z-index:100;} -/* 지도 안에 버튼들 관리 */ -.area-input{margin-top:10px; margin-left:10px;width:200px;} -.area-button{margin-top:10px; margin-left:10px;} -.map-comp{position:relative; z-index:100;display:flex;} - - .control-btn{margin-left: 7px; border-bottom: solid 1px #283046; margin-bottom:5px;} .buffer-input{text-align: center; border-radius: 100px; border: 1px solid #283046; width: 70px; margin-left: 5px;} .buffer-btn{text-align: center; border-radius: 100px; border: 1px solid #283046; width: 30px; margin-left: 5px;} @@ -778,4 +772,15 @@ background-size: 75% auto; .user-search-id{font-weight:500;} .user-search-modal .modal-body{font-size:1.125rem;padding:30px 20px} .user-search-modal .modal-body .etc-txt{display:block;font-weight:500;margin-bottom:1rem} -.user-search-link button{font-size:0.875rem;margin-top:20px} \ No newline at end of file +.user-search-link button{font-size:0.875rem;margin-top:20px} + + +/* 지도 안에 버튼들 관리 */ +.search-comp{position:relative; z-index:100;display:flex;} +.search-feather{padding-top:10px;margin-left:10px;width:400px;} + +.search-result-comp{margin:0 0 0 10px;background-color:#fff;} +.search-result{padding:10px 0 5px 10px;} +.search-result:hover{background-color:#e7e7e7} +.search-result .title{font-size:14px;color:#000} +.search-result .address{font-size:13px;color:#343D55} \ No newline at end of file diff --git a/src/components/basis/flight/plan/FlightPlanAreaMap.js b/src/components/basis/flight/plan/FlightPlanAreaMap.js index 472e4e3..3723d57 100644 --- a/src/components/basis/flight/plan/FlightPlanAreaMap.js +++ b/src/components/basis/flight/plan/FlightPlanAreaMap.js @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react'; -import { Card, CardBody, Button, Input } from 'reactstrap'; +import { Card, CardBody, Button, Input, Row, Col, InputGroup, InputGroupAddon, InputGroupText, FormGroup } from 'reactstrap'; +import { Search } from 'react-feather' import { useDispatch, useSelector } from 'react-redux'; import { FeatureAirZone } from '../../../map/naver/feature/FeatureAirZone'; import { @@ -28,7 +29,9 @@ const FlightPlanAreaMap = props => { initFlightBas.initDetail.areaList ); - const [query, setQuery] = useState(); + const [query, setQuery] = useState(''); + const [searchRes, setSearchRes] = useState([]); + const [isSearch, setIsSearch] = useState(false); useEffect(() => { NaverMapInit(); @@ -143,7 +146,9 @@ const FlightPlanAreaMap = props => { }; const handleSearch = async () => { - const res = await flightPlanAPI.searchArea({ query: query }); + const res = await flightPlanAPI.searchArea({query: query}); + setIsSearch(true); + setSearchRes(res.data.items); }; const handleChange = e => { @@ -154,6 +159,19 @@ const FlightPlanAreaMap = props => { } }; + const handleCoord = (mapx, mapy) => { + let utmk = naver.maps.TransCoord.fromTM128ToUTMK(naver.maps.Point(mapx, mapy)); + let latlng = naver.maps.TransCoord.fromUTMKToLatLng(utmk); + + setIsSearch(false); + + let options = { + duration: 800, + easing: 'easeOutCubic' + } + map.morph(latlng, 16, options) + } + return ( @@ -180,7 +198,65 @@ const FlightPlanAreaMap = props => { /> ) : null} -
+
+
+ + + + + + + + +
+ +
+
+
+ + {/*
{ > 검색 - {/* handlerDrawType('RESET')} - // {...props.test? ( - // {} - // ):( - // {disabled:false} - // )} - disabled={props.test} - size='sm' - > - 초기화 - */} -
+
*/} + +