Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김대철
/
CafeRecommend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
dckat
2021-05-12 21:49:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ce0803c6a3edd562bf44746de7b2e48307344d28
ce0803c6
1 parent
1b83ce74
중심좌표 현재위치로 구현
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
sessions/KtkF-7vF5BubSnuzjkUN0L2pGZOTFBqC.json
views/map.ejs
sessions/KtkF-7vF5BubSnuzjkUN0L2pGZOTFBqC.json
View file @
ce0803c
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1620820123092
,
"user"
:{
"name"
:
"김대철[학생](소프트웨어융합대학 컴퓨터공학과)"
,
"email"
:
"kdc9619@khu.ac.kr"
,
"picture"
:
"https://lh3.googleusercontent.com/a/AATXAJyP14ipRboJZ8T5-oNS3sRp4CG8wKCEwVABQ5G_=s96-c"
}}
\ No newline at end of file
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1620823546959
,
"user"
:{
"name"
:
"김대철[학생](소프트웨어융합대학 컴퓨터공학과)"
,
"email"
:
"kdc9619@khu.ac.kr"
,
"picture"
:
"https://lh3.googleusercontent.com/a/AATXAJyP14ipRboJZ8T5-oNS3sRp4CG8wKCEwVABQ5G_=s96-c"
}}
\ No newline at end of file
...
...
views/map.ejs
View file @
ce0803c
...
...
@@ -12,13 +12,40 @@
src=
"//dapi.kakao.com/v2/maps/sdk.js?appkey=68cbccbcd6f0fef0a213e62ad37393ee"
></script>
<script>
const
mapContainer
=
document
.
getElementById
(
"map"
),
var
lat
=
""
;
var
lon
=
""
;
var
mapContainer
=
document
.
getElementById
(
"map"
),
mapOption
=
{
center
:
new
kakao
.
maps
.
LatLng
(
3
7
.2477502
,
127.078164
),
center
:
new
kakao
.
maps
.
LatLng
(
3
6
.2477502
,
127.078164
),
level
:
3
,
};
const
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
var
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
function
(
position
)
{
lat
=
position
.
coords
.
latitude
;
lon
=
position
.
coords
.
longitude
;
var
locPosition
=
new
kakao
.
maps
.
LatLng
(
lat
,
lon
);
displayMarker
(
locPosition
);
});
}
else
{
var
locPosition
=
new
kakao
.
maps
.
LatLng
(
36.2477502
,
127.078164
);
displayMarker
(
locPosition
);
}
function
displayMarker
(
locPosition
)
{
var
marker
=
new
daum
.
maps
.
Marker
({
map
:
map
,
position
:
locPosition
,
});
map
.
setCenter
(
locPosition
);
}
</script>
</body>
</html>
...
...
Please
register
or
login
to post a comment