diff --git a/src/views/weather/WeatherView.js b/src/views/weather/WeatherView.js index 22205984..72d2a1d8 100644 --- a/src/views/weather/WeatherView.js +++ b/src/views/weather/WeatherView.js @@ -1,19 +1,17 @@ import { WINDY_KEY } from '../../configs/constants'; import React, { useEffect, useState } from 'react'; -import { Search } from 'react-feather' -import { Card, CardBody, Button, Input, Row, Col, InputGroup, InputGroupAddon, InputGroupText, FormGroup } from 'reactstrap'; +import { Search } from 'react-feather'; +import '../../assets/css/custom.css'; +import { Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap'; import { useDispatch, useSelector } from 'react-redux'; import { flightPlanAPI } from '../../modules/basis/flight/apis/basisFlightApi'; - const WeatherView = () => { - const [query, setQuery] = useState(''); const [searchRes, setSearchRes] = useState([]); const [isSearch, setIsSearch] = useState(false); const dispatch = useDispatch(); const [map, setMap] = useState(); - const options = { // Required: API key @@ -24,7 +22,6 @@ const WeatherView = () => { // Optional: Initial state of the map }; - const handleSearch = async () => { const res = await flightPlanAPI.searchArea({ query: query }); setIsSearch(true); @@ -39,19 +36,20 @@ const WeatherView = () => { } }; 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); - + setMap(latlng); let options = { duration: 800, easing: 'easeOutCubic' - } + }; // map.morph(latlng, 16, options) console.log(map); - - } + }; const handleEnter = e => { if (e.key == 'Enter') { handleSearch(); @@ -59,7 +57,7 @@ const WeatherView = () => { }; return ( <> -
+
@@ -98,7 +96,6 @@ const WeatherView = () => {
- {/* {prev.address} */} {prev.roadAddress}
@@ -113,18 +110,17 @@ const WeatherView = () => {
- {!map ? - + {!map ? (