Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김동훈
/
OpenSource_Project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
전수민
2018-12-14 07:58:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
06e971b5ad7c1acd8134f0ea0e1d83ad03dd8608
06e971b5
1 parent
0d3b0504
font link
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
268 additions
and
194 deletions
public/Entertainment.html
public/Rooms.html
public/entertainment.jpg
public/js/showEnt.js
public/Entertainment.html
View file @
06e971b
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
<title>
저기어때
</title>
<!-- Bootstrap core CSS-->
<link
href=
"vendor/bootstrap/css/bootstrap.min.css"
rel=
"stylesheet"
>
<!-- Custom fonts for this template-->
<link
href=
"vendor/fontawesome-free/css/all.min.css"
rel=
"stylesheet"
type=
"text/css"
>
<!-- Page level plugin CSS-->
<link
href=
"vendor/datatables/dataTables.bootstrap4.css"
rel=
"stylesheet"
>
<!-- Custom styles for this template-->
<link
href=
"css/sb-admin.css"
rel=
"stylesheet"
>
</head>
<body
id=
"page-top"
>
<nav
class=
"navbar navbar-expand navbar-dark bg-dark static-top"
>
<a
class=
"navbar-brand mr-1"
href=
"index.html"
>
저기어때
</a>
<button
class=
"btn btn-link btn-sm text-white order-1 order-sm-0"
id=
"sidebarToggle"
href=
"#"
>
<i
class=
"fas fa-bars"
></i>
</button>
</nav>
<div
id=
"wrapper"
>
<!-- Sidebar -->
<ul
class=
"sidebar navbar-nav"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"index.html"
>
<i
class=
"fas fa-map-marker"
></i>
<span>
Map
</span>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"Foods.html"
>
<i
class=
"fas fa-utensils"
area-hidden =
"true"
></i>
<span>
Foods
</span>
</a>
</li>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
href=
"Entertainment.html"
>
<i
class=
"fas fa-gamepad"
></i>
<span>
Entertainment
</span>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"Rooms.html"
>
<i
class=
"fas fa-bed"
></i>
<span>
Rooms
</span>
</a>
</li>
</ul>
<div
id=
"content-wrapper"
>
<div
class=
"container-fluid"
>
<!-- Breadcrumbs-->
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
>
<a
href=
"#"
>
Entertainment
</a>
</li>
</ol>
<script>
var
result_entertainment
=
[]
</script>
<script
type=
"text/javascript"
src=
"/js/showEnt.js"
></script>
<script
src=
"https://maps.googleapis.com/maps/api/js?key=AIzaSyDg4CkUEEt_96n1ork1nL5t4E_SpdKrgMI&libraries=places&callback=initMap"
async
defer
></script>
<!-- Icon Cards-->
<div
class=
"row"
>
<div
class=
"col-xl-3 col-sm-6 mb-3"
>
<div
class=
"card text-white bg-primary o-hidden h-100"
>
<div
class=
"card-body"
>
<div
class=
"card-body-icon"
>
<i
class=
"fas fa-fw fa-comments"
></i>
</div>
<div
class=
"mr-5"
>
26 New Messages!
</div>
</div>
<a
class=
"card-footer text-white clearfix small z-1"
href=
"#"
>
<span
class=
"float-left"
>
View Details
</span>
<span
class=
"float-right"
>
<i
class=
"fas fa-angle-right"
></i>
</span>
</a>
</div>
</div>
<div
class=
"col-xl-3 col-sm-6 mb-3"
>
<div
class=
"card text-white bg-warning o-hidden h-100"
>
<div
class=
"card-body"
>
<div
class=
"card-body-icon"
>
<i
class=
"fas fa-fw fa-list"
></i>
</div>
<div
class=
"mr-5"
>
11 New Tasks!
</div>
</div>
<a
class=
"card-footer text-white clearfix small z-1"
href=
"#"
>
<span
class=
"float-left"
>
View Details
</span>
<span
class=
"float-right"
>
<i
class=
"fas fa-angle-right"
></i>
</span>
</a>
</div>
</div>
<div
class=
"col-xl-3 col-sm-6 mb-3"
>
<div
class=
"card text-white bg-success o-hidden h-100"
>
<div
class=
"card-body"
>
<div
class=
"card-body-icon"
>
<i
class=
"fas fa-fw fa-shopping-cart"
></i>
</div>
<div
class=
"mr-5"
>
123 New Orders!
</div>
</div>
<a
class=
"card-footer text-white clearfix small z-1"
href=
"#"
>
<span
class=
"float-left"
>
View Details
</span>
<span
class=
"float-right"
>
<i
class=
"fas fa-angle-right"
></i>
</span>
</a>
</div>
</div>
<div
class=
"col-xl-3 col-sm-6 mb-3"
>
<div
class=
"card text-white bg-danger o-hidden h-100"
>
<div
class=
"card-body"
>
<div
class=
"card-body-icon"
>
<i
class=
"fas fa-fw fa-life-ring"
></i>
</div>
<div
class=
"mr-5"
>
13 New Tickets!
</div>
</div>
<a
class=
"card-footer text-white clearfix small z-1"
href=
"#"
>
<span
class=
"float-left"
>
View Details
</span>
<span
class=
"float-right"
>
<i
class=
"fas fa-angle-right"
></i>
</span>
</a>
</div>
</div>
</div>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
<title>
저기어때
</title>
<!-- Bootstrap core CSS-->
<link
href=
"vendor/bootstrap/css/bootstrap.min.css"
rel=
"stylesheet"
>
<!-- Custom fonts for this template-->
<link
href=
"vendor/fontawesome-free/css/all.min.css"
rel=
"stylesheet"
type=
"text/css"
>
<!-- Page level plugin CSS-->
<link
href=
"vendor/datatables/dataTables.bootstrap4.css"
rel=
"stylesheet"
>
<!-- Custom styles for this template-->
<link
href=
"css/sb-admin.css"
rel=
"stylesheet"
>
<link
href=
"https://fonts.googleapis.com/css?family=Do+Hyeon&subset=korean"
rel=
"stylesheet"
>
</head>
<body
id=
"page-top"
>
<nav
class=
"navbar navbar-expand navbar-dark bg-dark static-top"
>
<a
class=
"navbar-brand mr-1"
href=
"index.html"
>
저기어때
</a>
<button
class=
"btn btn-link btn-sm text-white order-1 order-sm-0"
id=
"sidebarToggle"
href=
"#"
>
<i
class=
"fas fa-bars"
></i>
</button>
</nav>
<div
id=
"wrapper"
>
<!-- Sidebar -->
<ul
class=
"sidebar navbar-nav"
>
<p
class=
"small text-center text-muted my-5"
>
<em>
More chart examples coming soon...
</em>
</p>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"index.html"
>
<i
class=
"fas fa-map-marker"
></i>
<span>
Map
</span>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"Foods.html"
>
<i
class=
"fas fa-utensils"
area-hidden=
"true"
></i>
<span>
Foods
</span>
</a>
</li>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
href=
"Entertainment.html"
>
<i
class=
"fas fa-gamepad"
></i>
<span>
Entertainment
</span>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"Rooms.html"
>
<i
class=
"fas fa-bed"
></i>
<span>
Rooms
</span>
</a>
</li>
</ul>
<div
id=
"content-wrapper"
>
<div
class=
"container-fluid"
>
<!-- Breadcrumbs-->
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
>
<a
href=
"#"
>
Entertainment
</a>
</li>
</ol>
<!-- Icon Cards-->
<div
class=
"row"
id=
"cardBody"
>
</div>
<!-- /.container-fluid -->
<!-- Sticky Footer -->
<footer
class=
"sticky-footer"
>
<div
class=
"container my-auto"
>
<div
class=
"copyright text-center my-auto"
>
<span>
Copyright © Your Website 2018
</span>
</div>
</div>
</footer>
<!-- <script>
var result_entertainment = []
</script> -->
<script>
var
result_entertainment
=
[]
var
entName
=
''
;
var
entType
=
''
;
var
card
=
''
;
var
map
;
var
service
;
function
initMap
()
{
// Try HTML5 geolocation.
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
function
(
position
)
{
pos
=
{
lat
:
position
.
coords
.
latitude
,
lng
:
position
.
coords
.
longitude
};
map
=
new
google
.
maps
.
Map
(
document
.
getElementById
(
'map'
),
{
center
:
pos
,
zoom
:
17
});
map
.
setCenter
(
pos
);
service
=
new
google
.
maps
.
places
.
PlacesService
(
map
);
searchPlace
(
'department_store'
,
'entertainment'
);
searchPlace
(
'movie_theater'
,
'entertainment'
);
searchPlace
(
'museum'
,
'entertainment'
);
searchPlace
(
'night_club'
,
'entertainment'
);
searchPlace
(
'shopping_mall'
,
'entertainment'
);
searchPlace
(
'zoo'
,
'entertainment'
);
});
}
}
async
function
searchPlace
(
str
,
placeType
)
{
switch
(
placeType
)
{
case
'food'
:
service
.
nearbySearch
({
location
:
pos
,
radius
:
500
,
type
:
[
str
]
},
await
callback_foods
);
break
;
case
'entertainment'
:
service
.
nearbySearch
({
location
:
pos
,
radius
:
500
,
type
:
[
str
]
},
await
callback_entertainment
);
break
;
case
'room'
:
service
.
nearbySearch
({
location
:
pos
,
radius
:
500
,
type
:
[
str
]
},
await
callback_rooms
);
break
;
default
:
break
;
}
}
function
callback_entertainment
(
results
,
status
)
{
if
(
status
===
google
.
maps
.
places
.
PlacesServiceStatus
.
OK
)
{
for
(
var
i
=
0
;
i
<
results
.
length
;
i
++
)
{
console
.
log
(
results
[
i
]);
result_entertainment
.
push
(
results
[
i
])
}
}
}
// const id = result['id'];
// const place_id =result['place_id'];
// const name = result['name'];
// const address = result['vicinity'];
// let category_big = category1
// const category_small = result.types[0];
// const image = "default"
// const rating = result.rating;
// const lng = result.geometry.viewport.ea.j;
// const lat =result.geometry.viewport.la.j;
setTimeout
(
function
(){
for
(
var
i
=
0
;
i
<
result_entertainment
.
length
;
i
++
)
{
entName
=
result_entertainment
[
i
][
name
];
entType
=
"result_entertainment[i][types];"
var
tmp
=
'<div class="col-xl-6 col-sm-6 mb-3">'
+
'<div class="card text-white bg-light o-hidden h-100">'
+
'<div class="card-body"'
+
' style="height:350px; background-image:url('
+
"'entertainment.jpg'"
+
'); background-size: 100% 100%; background-repeat: no-repeat;">'
+
// place photo
'<div class="mr-5" id="nameDiv">'
+
entName
+
'</div>'
+
// place name
'<div class="mr-5" id="typeDiv">'
+
entType
+
'</div>'
+
// place type
'</div>'
+
'</div>'
+
'</div>'
;
card
+=
tmp
;
}
},
5000
);
document
.
getElementById
(
"cardBody"
).
innerHTML
=
card
;
</script>
<div
id=
"map"
></div>
<script
src=
"https://maps.googleapis.com/maps/api/js?key=AIzaSyDg4CkUEEt_96n1ork1nL5t4E_SpdKrgMI&libraries=places&callback=initMap"
async
defer
></script>
</div>
<!-- /.content-wrapper -->
<!-- /.container-fluid -->
<!-- Sticky Footer -->
<footer
class=
"sticky-footer"
>
<div
class=
"container my-auto"
>
<div
class=
"copyright text-center my-auto"
>
<span>
Copyright © Your Website 2018
</span>
</div>
</div>
</footer>
</div>
<!-- /#wrapper -->
<!-- /.content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Scroll to Top Button-->
<a
class=
"scroll-to-top rounded"
href=
"#page-top"
>
<i
class=
"fas fa-angle-up"
></i>
</a>
<!-- Scroll to Top Button-->
<a
class=
"scroll-to-top rounded"
href=
"#page-top"
>
<i
class=
"fas fa-angle-up"
></i>
</a>
<!-- Bootstrap core JavaScript-->
<script
src=
"vendor/jquery/jquery.min.js"
></script>
<script
src=
"vendor/bootstrap/js/bootstrap.bundle.min.js"
></script>
<!-- Bootstrap core JavaScript-->
<script
src=
"vendor/jquery/jquery.min.js"
></script>
<script
src=
"vendor/bootstrap/js/bootstrap.bundle.min.js"
></script>
<!-- Core plugin JavaScript-->
<script
src=
"vendor/jquery-easing/jquery.easing.min.js"
></script>
<!-- Core plugin JavaScript-->
<script
src=
"vendor/jquery-easing/jquery.easing.min.js"
></script>
<!-- Page level plugin JavaScript-->
<script
src=
"vendor/chart.js/Chart.min.js"
></script>
<!-- Page level plugin JavaScript-->
<script
src=
"vendor/chart.js/Chart.min.js"
></script>
<!-- Custom scripts for all pages-->
<script
src=
"js/sb-admin.min.js"
></script>
<!-- Custom scripts for all pages-->
<script
src=
"js/sb-admin.min.js"
></script>
<!-- Demo scripts for this page-->
<script
src=
"js/demo/chart-area-demo.js"
></script>
<script
src=
"js/demo/chart-bar-demo.js"
></script>
<script
src=
"js/demo/chart-pie-demo.js"
></script>
<!-- Demo scripts for this page-->
<script
src=
"js/demo/chart-area-demo.js"
></script>
<script
src=
"js/demo/chart-bar-demo.js"
></script>
<script
src=
"js/demo/chart-pie-demo.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
...
...
public/Rooms.html
View file @
06e971b
...
...
@@ -23,6 +23,8 @@
<!-- Custom styles for this template-->
<link
href=
"css/sb-admin.css"
rel=
"stylesheet"
>
<link
href=
"https://fonts.googleapis.com/css?family=Do+Hyeon&subset=korean"
rel=
"stylesheet"
>
</head>
<body
id=
"page-top"
>
...
...
public/entertainment.jpg
0 → 100644
View file @
06e971b
59.6 KB
public/js/showEnt.js
View file @
06e971b
var
entName
=
''
;
var
entType
=
''
;
var
entPhoto
=
''
;
var
card
=
''
;
function
initMap
()
{
// Try HTML5 geolocation.
if
(
navigator
.
geolocation
)
{
...
...
@@ -17,28 +22,28 @@ function initMap() {
}
}
function
searchPlace
(
str
,
placeType
)
{
async
function
searchPlace
(
str
,
placeType
)
{
switch
(
placeType
)
{
case
'food'
:
service
.
nearbySearch
({
location
:
pos
,
radius
:
500
,
type
:
[
str
]
},
callback_foods
);
},
await
callback_foods
);
break
;
case
'entertainment'
:
service
.
nearbySearch
({
location
:
pos
,
radius
:
500
,
type
:
[
str
]
},
callback_entertainment
);
},
await
callback_entertainment
);
break
;
case
'room'
:
service
.
nearbySearch
({
location
:
pos
,
radius
:
500
,
type
:
[
str
]
},
callback_rooms
);
},
await
callback_rooms
);
break
;
default
:
break
;
...
...
@@ -48,6 +53,7 @@ function searchPlace(str, placeType) {
function
callback_entertainment
(
results
,
status
)
{
if
(
status
===
google
.
maps
.
places
.
PlacesServiceStatus
.
OK
)
{
for
(
var
i
=
0
;
i
<
results
.
length
;
i
++
)
{
console
.
log
(
results
[
i
]);
result_entertainment
.
push
(
result
[
i
])
}
}
...
...
@@ -62,4 +68,29 @@ function callback_entertainment(results, status) {
// const image = "default"
// const rating = result.rating;
// const lng = result.geometry.viewport.ea.j;
const
lat
=
result
.
geometry
.
viewport
.
la
.
j
;
// const lat =result.geometry.viewport.la.j;
for
(
var
i
=
0
;
i
<
entList
.
size
();
i
++
){
entName
=
result_entertainment
[
i
][
name
];
entType
=
result_entertainment
[
i
][
category
];
// if(result_entertainment[i][photo]==undefined){
// entPhoto = "noimage.png";
// }
// else{
// entPhoto = entList[i][photo];
}
var
tmp
=
'<div class="col-xl-6 col-sm-6 mb-3">'
+
'<div class="card text-white bg-light o-hidden h-100">'
+
'<div class="card-body"'
+
' style="height:350px; background-image:url('
+
"'2.jpg'"
+
'); background-size: 100% 100%; background-repeat: no-repeat;">'
+
// place photo
// '<div class="mr-5" id="nameDiv">'+entName+'</div>'+ // place name
// '<div class="mr-5" id="typeDiv">'+entType+'</div>'+ // place type
'<div class="mr-5" id="nameDiv">가게이름</div>'
+
// place name
'<div class="mr-5" id="typeDiv">타입</div>'
+
// place type
'</div>'
+
'</div>'
+
'</div>'
;
//card+=tmp;
document
.
getElementById
(
"cardBody"
).
innerHTML
=
tmp
;
\ No newline at end of file
...
...
Please
register
or
login
to post a comment