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
HeoJeongYong
2021-06-06 01:01:16 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
e7945fd54a6506dc2621c7d421e9837b2f77bc78
e7945fd5
2 parents
d79d253a
77713d2c
Merge branch 'integrated#_Html' into 'master'
Integrated# html See merge request
!18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
app.js
views/index.ejs
app.js
View file @
e7945fd
...
...
@@ -100,3 +100,5 @@ app.listen(3000,function(){
console
.
log
(
'Connected 3000 port!'
);
});
...
...
views/index.ejs
View file @
e7945fd
...
...
@@ -32,11 +32,11 @@
</form>
</center>
<div
id=
"map"
style=
"width:1300px;height:750px; margin-left:100px; float:left; border: 3px solid; "
></div>
<script
type=
"text/javascript"
src=
"https://dapi.kakao.com/v2/maps/sdk.js?appkey=35fccf4b4e2a3179187346f26ed3f988&libraries=services"
></script>
<
% if(typeof(info) != "undefined"){ %>
<div
id=
"map"
style=
"width:65%;height:550px;float:left; margin-left: 2%; border-radius: 2%; border:1px solid black"
></div>
<
% if(typeof(info) != "undefined"){ %>
<div
style=
"overflow:scroll; width:25%; height:550px;float:left; margin-left:2%; border:1px solid black;"
>
<ol
id=
"placelist"
>
<
% for(i=0; i
<info
.
length
;
i
++){%
>
...
...
@@ -71,7 +71,7 @@
var
mapContainer
=
document
.
getElementById
(
'map'
),
// 지도를 표시할 div
mapOption
=
{
center
:
new
kakao
.
maps
.
LatLng
(
37.596672
,
127.051950
),
// 지도의 중심좌표
level
:
2
// 지도의 확대 레벨
level
:
3
// 지도의 확대 레벨
};
var
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
// 지도를 생성합니다
...
...
@@ -140,7 +140,7 @@
geocoder
.
addressSearch
(
tmpaddr
,
function
(
result
,
status
)
{
if
(
status
===
kakao
.
maps
.
services
.
Status
.
OK
)
{
var
coords
=
new
kakao
.
maps
.
LatLng
(
result
[
0
].
y
,
result
[
0
].
x
);
map
.
setCenter
(
coords
);
//map.setCenter(coords);//인포윈도우 생성 마커로 이동
var
marker
=
new
kakao
.
maps
.
Marker
({
position
:
coords
,
clickable
:
true
...
...
@@ -160,6 +160,16 @@
}
}
</script>
<
% }else{ %>
<script>
//입력 값이 없을 때 기본 지도 띄움
var
mapContainer
=
document
.
getElementById
(
'map'
),
// 지도를 표시할 div
mapOption
=
{
center
:
new
kakao
.
maps
.
LatLng
(
37.596672
,
127.051950
),
// 지도의 중심좌표
level
:
3
// 지도의 확대 레벨
};
var
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
// 지도를 생성합니다
</script>
<
% } %>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment