강희주

Merge remote-tracking branch 'refs/remotes/origin/master'

...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
12 console.log(userLat); 12 console.log(userLat);
13 var userLng = document.getElementById('longitude').innerText.trim(); // trim으로 공백을 제거하고 실제 값만 불러오기 13 var userLng = document.getElementById('longitude').innerText.trim(); // trim으로 공백을 제거하고 실제 값만 불러오기
14 console.log(userLng); 14 console.log(userLng);
15 +
15 const APIKEY = "ea903679a6e5a44da75a971c0231f4f4"; 16 const APIKEY = "ea903679a6e5a44da75a971c0231f4f4";
16 fetch("https://api.openweathermap.org/data/2.5/weather?lat=" + userLat + "&lon=" + userLng + "&appid=" + APIKEY + "&units=metric") 17 fetch("https://api.openweathermap.org/data/2.5/weather?lat=" + userLat + "&lon=" + userLng + "&appid=" + APIKEY + "&units=metric")
17 .then(res => res.json()) 18 .then(res => res.json())
...@@ -90,11 +91,13 @@ ...@@ -90,11 +91,13 @@
90 <fieldset> 91 <fieldset>
91 <legend>현재 내 위치 정보</legend> 92 <legend>현재 내 위치 정보</legend>
92 <div><input type="button" value="현재 내 위치 검색"></div><br><!-- 검색 버튼 누르면 팝업으로 위치 서비스 동의 버튼 뜨게 하기 --> 93 <div><input type="button" value="현재 내 위치 검색"></div><br><!-- 검색 버튼 누르면 팝업으로 위치 서비스 동의 버튼 뜨게 하기 -->
94 + <div><input type="button" value="현재 내 위치 검색"></div><br>
93 <li>위도:<span id="latitude"></span></li> 95 <li>위도:<span id="latitude"></span></li>
94 <li>경도:<span id="longitude"></span></li> 96 <li>경도:<span id="longitude"></span></li>
95 <li>위치:<span id="LocationName"></span></li> 97 <li>위치:<span id="LocationName"></span></li>
96 <li>날씨:<span id="WeatherCondition"></span></li> 98 <li>날씨:<span id="WeatherCondition"></span></li>
97 <li>기온:<span id="Temp"></span></li> 99 <li>기온:<span id="Temp"></span></li>
100 + <!-- 검색 버튼 누르면 팝업으로 위치 서비스 동의 버튼 뜨게 하기 -->
98 </fieldset> 101 </fieldset>
99 102
100 <fieldset> 103 <fieldset>
...@@ -124,6 +127,7 @@ ...@@ -124,6 +127,7 @@
124 </fieldset> 127 </fieldset>
125 128
126 129
130 +
127 <br> 131 <br>
128 <br> 132 <br>
129 <br> 133 <br>
......
...@@ -259,8 +259,3 @@ app.listen(3000, function() { ...@@ -259,8 +259,3 @@ app.listen(3000, function() {
259 }); 259 });
260 260
261 261
262 -//로그인 로그아웃 여부
263 -const authInfo = (req)=>{
264 - if(req.user) return `${user.name} | <a href="/logout">로그아웃</a>`;
265 - return `<a href="/login">login</a>`;
266 -}
...\ No newline at end of file ...\ No newline at end of file
......