|
|
|
@ -1,6 +1,17 @@
|
|
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
|
import { Card, CardBody, Button, Input, Row, Col, InputGroup, InputGroupAddon, InputGroupText, FormGroup } from 'reactstrap'; |
|
|
|
|
import { Search } from 'react-feather' |
|
|
|
|
import { |
|
|
|
|
Card, |
|
|
|
|
CardBody, |
|
|
|
|
Button, |
|
|
|
|
Input, |
|
|
|
|
Row, |
|
|
|
|
Col, |
|
|
|
|
InputGroup, |
|
|
|
|
InputGroupAddon, |
|
|
|
|
InputGroupText, |
|
|
|
|
FormGroup |
|
|
|
|
} from 'reactstrap'; |
|
|
|
|
import { Key, Search } from 'react-feather'; |
|
|
|
|
import { useDispatch, useSelector } from 'react-redux'; |
|
|
|
|
import { FeatureAirZone } from '../../../map/naver/feature/FeatureAirZone'; |
|
|
|
|
import { |
|
|
|
@ -160,7 +171,9 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleCoord = (mapx, mapy) => { |
|
|
|
|
let utmk = naver.maps.TransCoord.fromTM128ToUTMK(naver.maps.Point(mapx, mapy)); |
|
|
|
|
let utmk = naver.maps.TransCoord.fromTM128ToUTMK( |
|
|
|
|
naver.maps.Point(mapx, mapy) |
|
|
|
|
); |
|
|
|
|
let latlng = naver.maps.TransCoord.fromUTMKToLatLng(utmk); |
|
|
|
|
|
|
|
|
|
setIsSearch(false); |
|
|
|
@ -168,9 +181,9 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
let options = { |
|
|
|
|
duration: 800, |
|
|
|
|
easing: 'easeOutCubic' |
|
|
|
|
} |
|
|
|
|
map.morph(latlng, 16, options) |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
map.morph(latlng, 16, options); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleEnter = e => { |
|
|
|
|
if (e.key == 'Enter') { |
|
|
|
@ -209,10 +222,7 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
<InputGroup className='search-feather'> |
|
|
|
|
<InputGroupAddon addonType='prepend'> |
|
|
|
|
<InputGroupText> |
|
|
|
|
<Search |
|
|
|
|
size={14} |
|
|
|
|
onClick={handleSearch} |
|
|
|
|
/> |
|
|
|
|
<Search size={14} onClick={handleSearch} /> |
|
|
|
|
</InputGroupText> |
|
|
|
|
</InputGroupAddon> |
|
|
|
|
<Input |
|
|
|
@ -220,7 +230,7 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
id='searchInput' |
|
|
|
|
name='searchInput' |
|
|
|
|
bsSize='sm' |
|
|
|
|
autocomplete='off' |
|
|
|
|
autoComplete='off' |
|
|
|
|
placeholder='검색명을 입력하세요.' |
|
|
|
|
onChange={handleChange} |
|
|
|
|
onKeyPress={handleEnter} |
|
|
|
@ -228,15 +238,16 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
</InputGroup> |
|
|
|
|
<div className='search-result-comp'> |
|
|
|
|
<ul> |
|
|
|
|
{searchRes?.length!=0 && isSearch? ( |
|
|
|
|
|
|
|
|
|
{searchRes?.length !== 0 && isSearch ? ( |
|
|
|
|
searchRes?.map((prev, idx) => { |
|
|
|
|
let title = prev.title.replaceAll('<b>', ''); |
|
|
|
|
title = title.replaceAll('</b>', ''); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<li onClick={() => handleCoord(prev.mapx, prev.mapy)}> |
|
|
|
|
<li |
|
|
|
|
key={prev.address} |
|
|
|
|
onClick={() => handleCoord(prev.mapx, prev.mapy)} |
|
|
|
|
> |
|
|
|
|
<a> |
|
|
|
|
<div className='search-result'> |
|
|
|
|
<div className='title'> |
|
|
|
@ -251,9 +262,7 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
</div> |
|
|
|
|
</a> |
|
|
|
|
</li> |
|
|
|
|
</> |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
}) |
|
|
|
|
) : ( |
|
|
|
|
<></> |
|
|
|
@ -282,8 +291,6 @@ const FlightPlanAreaMap = props => {
|
|
|
|
|
검색 |
|
|
|
|
</Button.Ripple> |
|
|
|
|
</div> */} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|