Skip to content
Snippets Groups Projects
Commit d551b459 authored by LEE's avatar LEE
Browse files

카카오 API 연동

parent d5972134
No related branches found
No related tags found
No related merge requests found
import React, {useState} from "react";
function SearchMap(props){
// 아주대학교를 기본 위치로 설정
const [state, setState] = useState({
center: { lat: 37.28238488648025, lng: 127.04350967609274 },
isPanto: true,
});
const [searchAddress, SetSearchAddress] = useState(); //주소
const handleInput = (e) => {
SetSearchAddress(e.target.value)
}
const SearchStart = () => {
console.log('Start Search!');
}
return (
<div className="UserInput">
{/* 주소를 입력할 수 있는 '검색'창 만들기 */}
<input onChange={handleInput}/>
<button onClick={SearchStart}>검색!</button>
</div>
)
}
function Search(props) { function Search(props) {
return ( return (
<div className="search"> <div className="search">
<h1>검색페이지입니다.</h1> <h1>검색페이지입니다.</h1>
<SearchMap/>
<div className="map"> <div className="map">
맵이 나타날 그림 맵이 나타날 그림
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment