Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김서연
/
Corona_Vaccination_Medical_Institution
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김서연
2021-05-30 18:00:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
88e95f1c4acf6c1834049bf9ca95edac390bf209
88e95f1c
1 parent
eff3a20f
수정
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
121 deletions
map/map.html
views/main.pug
map/map.html
deleted
100644 → 0
View file @
eff3a20
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
백신 접종 가능기관
</title>
</head>
<body>
<h1>
COVID-19 의료기관 검색하기
</h1>
<form
action=
"/"
method=
"post"
>
<p>
<input
type=
"text"
name=
"region"
placeholder=
"서울시"
/>
<input
type=
"submit"
/>
</p>
</form>
<div
id=
"map"
style=
"width: 700px;height:400px;"
></div>
<script
type=
"text/javascript"
src=
"https://dapi.kakao.com/v2/maps/sdk.js?appkey=35fccf4b4e2a3179187346f26ed3f988&libraries=services"
></script>
<script>
var
mapContainer
=
document
.
getElementById
(
'map'
),
// 지도를 표시할 div
mapOption
=
{
center
:
new
kakao
.
maps
.
LatLng
(
33.450701
,
126.570667
),
// 지도의 중심좌표
level
:
3
// 지도의 확대 레벨
};
// 지도를 생성합니다
var
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
// 주소-좌표 변환 객체를 생성합니다
var
geocoder
=
new
kakao
.
maps
.
services
.
Geocoder
();
// 주소로 좌표를 검색합니다
geocoder
.
addressSearch
(
'서울특별시 강동구 올림픽로 779'
,
function
(
result
,
status
)
{
// 정상적으로 검색이 완료됐으면
if
(
status
===
kakao
.
maps
.
services
.
Status
.
OK
)
{
var
coords
=
new
kakao
.
maps
.
LatLng
(
result
[
0
].
y
,
result
[
0
].
x
);
// 결과값으로 받은 위치를 마커로 표시합니다
var
marker
=
new
kakao
.
maps
.
Marker
({
map
:
map
,
position
:
coords
});
// 인포윈도우로 장소에 대한 설명을 표시합니다
var
infowindow
=
new
kakao
.
maps
.
InfoWindow
({
content
:
'<div style="width:150px;text-align:center;padding:6px 0;">기관명</div>'
});
infowindow
.
open
(
map
,
marker
);
// 지도의 중심을 결과값으로 받은 위치로 이동시킵니다
map
.
setCenter
(
coords
);
}
});
geocoder
.
addressSearch
(
'서울특별시 동대문구 회기로 173'
,
function
(
result
,
status
)
{
// 정상적으로 검색이 완료됐으면
if
(
status
===
kakao
.
maps
.
services
.
Status
.
OK
)
{
var
coords
=
new
kakao
.
maps
.
LatLng
(
result
[
0
].
y
,
result
[
0
].
x
);
// 결과값으로 받은 위치를 마커로 표시합니다
var
marker
=
new
kakao
.
maps
.
Marker
({
map
:
map
,
position
:
coords
});
// 인포윈도우로 장소에 대한 설명을 표시합니다
var
infowindow
=
new
kakao
.
maps
.
InfoWindow
({
content
:
'<div style="width:150px;text-align:center;padding:6px 0;">기관명</div>'
});
infowindow
.
open
(
map
,
marker
);
// 지도의 중심을 결과값으로 받은 위치로 이동시킵니다
map
.
setCenter
(
coords
);
}
});
</script>
</body>
</html>
\ No newline at end of file
views/main.pug
deleted
100644 → 0
View file @
eff3a20
//- html
//- head
//- meta(charset='utf-8')
//- body
//- h1 COVID-19 의료기관 검색하기
//- form(action='/' method="post")
//- p
//- input(type='text' name='region' placeholder='서울시')
//- input(type='submit')
//- //result값 있을때만
//- if result!=NULL
//- table
//- tr
//- th 기관명
//- th 기관 전화번호
//- th 기관 주소
//- th 휴무일 여부
//- th 점심 시작시간
//- th 점심 종료시간
//- th 진료 시작기간
//- th 진료 종료시간
//- -for(i=1; i<result.length; i++)
//- tr
//- td= result[i].orgnm
//- td= result[i].orgTlno
//- td= result[i].orgZipaddr
//- td= result[i].hldyYn
//- td= result[i].lunchSttTm
//- td= result[i].lunchEndTm
//- td= result[i].sttTm
//- td= result[i].endTm
\ No newline at end of file
Please
register
or
login
to post a comment