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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
public/Entertainment.html
public/Rooms.html
public/entertainment.jpg
public/js/showEnt.js
public/Entertainment.html
View file @
06e971b
This diff is collapsed. Click to expand it.
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