Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박준혁
/
os-17-2-termproject-jun
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
박준혁
2017-12-06 02:16:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9ef7533293e074b36663ff824f360731ec6df5ae
9ef75332
1 parent
8c550822
지도 출력
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
app.js
test.html
app.js
View file @
9ef7533
...
...
@@ -2,6 +2,7 @@ var express = require('express');
var
app
=
express
();
var
request
=
require
(
'request'
);
var
bodyParser
=
require
(
'body-parser'
);
var
fs
=
require
(
'fs'
);
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
app
.
locals
.
pretty
=
true
;
app
.
set
(
'view engine'
,
'jade'
);
...
...
@@ -28,6 +29,7 @@ app.get('/krestate', function(req, res){
console
.
log
(
'Headers'
,
JSON
.
stringify
(
response
.
headers
));
console
.
log
(
'Reponse received'
,
body
);
res
.
json
(
body
);
});
});
...
...
@@ -36,6 +38,20 @@ app.get('/template', function(req, res){
res
.
render
(
'temp'
);
});
app
.
listen
(
3000
,
function
(){
console
.
log
(
'Conneted 3000 port!'
);
});
\ No newline at end of file
app
.
get
(
'/estateInMap'
,
function
(
req
,
res
){
fs
.
readFile
(
'test.html'
,
function
(
error
,
data
){
if
(
error
){
console
.
log
(
error
);
}
else
{
res
.
writeHead
(
200
,
{
'Content-Type'
:
'text/html'
});
res
.
end
(
data
);
}
})
});
app
.
listen
(
3000
,
function
()
{
console
.
log
(
'Connected 3000!'
);
});
...
...
test.html
0 → 100644
View file @
9ef7533
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
>
<title>
간단한 지도 표시하기
</title>
<script
type=
"text/javascript"
src=
"https://openapi.map.naver.com/openapi/v3/maps.js?clientId=YOUR_CLIENT_ID"
></script>
</head>
<body>
<div
id=
"map"
style=
"width:100%;height:400px;"
></div>
<script>
var
mapOptions
=
{
center
:
new
naver
.
maps
.
LatLng
(
37.3595704
,
127.105399
),
zoom
:
10
};
var
map
=
new
naver
.
maps
.
Map
(
'map'
);
</script>
</body>
</html>
\ No newline at end of file
Please
register
or
login
to post a comment