Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강희주
/
Music_Recommendation_Website
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
강희주
2022-06-09 10:58:49 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a1a894c2142469c637b10d4c3fa376ac64a351cc
a1a894c2
2 parents
b6768d79
ca8dbb6d
Merge remote-tracking branch 'refs/remotes/origin/master'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
main_/main.html
main_/main.js
main_/main.html
View file @
a1a894c
...
...
@@ -12,6 +12,7 @@
console
.
log
(
userLat
);
var
userLng
=
document
.
getElementById
(
'longitude'
).
innerText
.
trim
();
// trim으로 공백을 제거하고 실제 값만 불러오기
console
.
log
(
userLng
);
const
APIKEY
=
"ea903679a6e5a44da75a971c0231f4f4"
;
fetch
(
"https://api.openweathermap.org/data/2.5/weather?lat="
+
userLat
+
"&lon="
+
userLng
+
"&appid="
+
APIKEY
+
"&units=metric"
)
.
then
(
res
=>
res
.
json
())
...
...
@@ -90,11 +91,13 @@
<fieldset>
<legend>
현재 내 위치 정보
</legend>
<div><input
type=
"button"
value=
"현재 내 위치 검색"
></div><br>
<!-- 검색 버튼 누르면 팝업으로 위치 서비스 동의 버튼 뜨게 하기 -->
<div><input
type=
"button"
value=
"현재 내 위치 검색"
></div><br>
<li>
위도:
<span
id=
"latitude"
></span></li>
<li>
경도:
<span
id=
"longitude"
></span></li>
<li>
위치:
<span
id=
"LocationName"
></span></li>
<li>
날씨:
<span
id=
"WeatherCondition"
></span></li>
<li>
기온:
<span
id=
"Temp"
></span></li>
<!-- 검색 버튼 누르면 팝업으로 위치 서비스 동의 버튼 뜨게 하기 -->
</fieldset>
<fieldset>
...
...
@@ -123,6 +126,7 @@
allow=
"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe><br>
</fieldset>
<br>
<br>
...
...
main_/main.js
View file @
a1a894c
...
...
@@ -259,8 +259,3 @@ app.listen(3000, function() {
});
//로그인 로그아웃 여부
const
authInfo
=
(
req
)
=>
{
if
(
req
.
user
)
return
`
${
user
.
name
}
| <a href="/logout">로그아웃</a>`
;
return
`<a href="/login">login</a>`
;
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment