Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오지민
/
HomePurchaseAgePrediction
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
서연진
2021-06-01 18:10:59 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ecc3d2793bc374c360e1a1c512cdc1636d940c2b
ecc3d279
1 parent
f60e6a86
다음 페이지에 값 받아오기
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
kakao/kakaomap.html
main.html
kakao/kakaomap.html
View file @
ecc3d27
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTR-8"
>
<meta
charset=
"UTR-8"
/
>
</head>
<body>
<h1>
전달받은 데이터
</h1>
<ul>
<li>
연봉: (????) 만 원
</li>
<li>
지출: (????) 만 원
</li>
</ul>
<div
id=
"map"
style=
"float:right"
></div>
<div
id=
"map"
></div>
<script
type=
"text/javascript"
src=
"//dapi.kakao.com/v2/maps/sdk.js?appkey=17cbb7795b615d8f1f0595f972e26c0f&libraries=services,clusterer,drawing"
></script>
<script>
var
Container
=
document
.
getElementById
(
"map"
)
var
Container
=
document
.
getElementById
(
"map"
)
;
var
Option
=
{
center
:
new
kakao
.
maps
.
LatLng
(
33.450701
,
126.570667
),
level
:
5
,
center
:
new
kakao
.
maps
.
LatLng
(
33.450701
,
126.570667
),
level
:
5
,
};
var
map
=
new
kakao
.
maps
.
Map
(
Container
,
Option
);
...
...
@@ -26,31 +21,47 @@
relayout
();
function
resizeMap
()
{
var
Container
=
document
.
getElementById
(
'map'
);
Container
.
style
.
width
=
'600px'
;
Container
.
style
.
height
=
'500px'
;
var
Container
=
document
.
getElementById
(
"map"
);
Container
.
style
.
width
=
"600px"
;
Container
.
style
.
height
=
"500px"
;
}
function
relayout
()
{
function
relayout
()
{
map
.
relayout
();
}
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
function
(
position
)
{
var
latitude
=
position
.
coords
.
latitude
,
longitude
=
position
.
coords
.
longitude
;
var
Position
=
new
kakao
.
maps
.
LatLng
(
latitude
,
longitude
);
displayMarker
(
Position
);
var
latitude
=
position
.
coords
.
latitude
,
longitude
=
position
.
coords
.
longitude
;
var
Position
=
new
kakao
.
maps
.
LatLng
(
latitude
,
longitude
);
displayMarker
(
Position
);
});
}
function
displayMarker
(
Position
)
{
var
marker
=
new
kakao
.
maps
.
Marker
({
map
:
map
,
position
:
Position
,
});
map
:
map
,
position
:
Position
,
});
map
.
setCenter
(
Position
);
map
.
setCenter
(
Position
);
function
getParameterByName
(
name
,
url
=
window
.
location
.
href
)
{
name
=
name
.
replace
(
/
[\[\]]
/g
,
"\\$&"
);
var
regex
=
new
RegExp
(
"[?&]"
+
name
+
"(=([^&#]*)|&|#|$)"
),
results
=
regex
.
exec
(
url
);
if
(
!
results
)
return
null
;
if
(
!
results
[
2
])
return
""
;
return
decodeURIComponent
(
results
[
2
].
replace
(
/
\+
/g
,
" "
));
}
var
salary
=
getParameterByName
(
"salary"
);
var
expenditure
=
getParameterByName
(
"expenditure"
);
console
.
log
(
salary
);
var
year
=
"3"
;
var
div
=
document
.
createElement
(
"div"
);
div
.
innerText
=
`
${
salary
}
의 월급과
${
expenditure
}
의 지출을 유지하면 당신은
${
year
}
년 후에 아래의 집을 구매할 수 있습니다.`
;
document
.
body
.
prepend
(
div
);
}
</script>
</body>
</html>
\ No newline at end of file
</html>
...
...
main.html
View file @
ecc3d27
...
...
@@ -20,7 +20,7 @@
사용자의 위치기반으로 집 구매 시기를 예측해드립니다 (사용자 위치 근처의
집을 찾아드립니다)
</h4>
<form
action=
"/geolocation"
method=
"
POS
T"
>
<form
action=
"/geolocation"
method=
"
GE
T"
>
<div>
연봉(단위:만 원)
<input
...
...
Please
register
or
login
to post a comment