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-08 00:17:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0a65bca7f31d5ca846ffcec6becf19c8c89def06
0a65bca7
1 parent
aa8b77ea
modify mainpage and add google map
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
77 deletions
views/index.html
webpage/index.html
views/index.html
View file @
0a65bca
...
...
@@ -29,7 +29,7 @@
function
initMap
()
{
map
=
new
google
.
maps
.
Map
(
document
.
getElementById
(
'map'
),
{
center
:
{
lat
:
-
34.397
,
lng
:
150.644
},
zoom
:
6
zoom
:
15
});
infoWindow
=
new
google
.
maps
.
InfoWindow
;
...
...
webpage/index.html
View file @
0a65bca
...
...
@@ -11,6 +11,20 @@
<title>
저기어때
</title>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map
{
height
:
100%
;
}
/* Optional: Makes the sample page fill the window. */
html
,
body
{
height
:
100%
;
margin
:
0
;
padding
:
0
;
}
</style>
<!-- Bootstrap core CSS-->
<link
href=
"vendor/bootstrap/css/bootstrap.min.css"
rel=
"stylesheet"
>
...
...
@@ -90,79 +104,53 @@
<div
id=
"content-wrapper"
>
<div
class=
"container-fluid"
>
<!-- 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>
-->
<div
id=
"map"
></div>
<script>
// Note: This example requires that you consent to location sharing when
// prompted by your browser. If you see the error "The Geolocation service
// failed.", it means you probably did not give permission for the browser to
// locate you.
var
map
,
infoWindow
;
function
initMap
()
{
map
=
new
google
.
maps
.
Map
(
document
.
getElementById
(
'map'
),
{
center
:
{
lat
:
34.497
,
lng
:
127.027
},
//center: {lat: -34.397, lng: 150.644},
zoom
:
15
});
infoWindow
=
new
google
.
maps
.
InfoWindow
;
// Try HTML5 geolocation.
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
function
(
position
)
{
var
pos
=
{
lat
:
position
.
coords
.
latitude
,
lng
:
position
.
coords
.
longitude
};
infoWindow
.
setPosition
(
pos
);
infoWindow
.
setContent
(
'Location found.'
);
infoWindow
.
open
(
map
);
map
.
setCenter
(
pos
);
},
function
()
{
handleLocationError
(
true
,
infoWindow
,
map
.
getCenter
());
});
}
else
{
// Browser doesn't support Geolocation
handleLocationError
(
false
,
infoWindow
,
map
.
getCenter
());
}
}
function
handleLocationError
(
browserHasGeolocation
,
infoWindow
,
pos
)
{
infoWindow
.
setPosition
(
pos
);
infoWindow
.
setContent
(
browserHasGeolocation
?
'Error: The Geolocation service failed.'
:
'Error: Your browser doesn\'t support geolocation.'
);
infoWindow
.
open
(
map
);
}
</script>
<script
async
defer
src=
"https://maps.googleapis.com/maps/api/js?key=AIzaSyDg4CkUEEt_96n1ork1nL5t4E_SpdKrgMI&callback=initMap"
>
</script>
<!-- Sticky Footer -->
<footer
class=
"sticky-footer"
>
<div
class=
"container my-auto"
>
...
...
@@ -173,9 +161,6 @@
</footer>
</div>
<!-- /.content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Scroll to Top Button-->
...
...
Please
register
or
login
to post a comment