-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (75 loc) · 3.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<title>Basic Google Map Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="./styles.css" />
<script type="module" src="mapScript.js"></script>
</head>
<body>
<header class="bg-dark text-white text-center">
<h1>Hamilton Map Explorer</h1>
<p class="lead">Explore the most interesting places in Hamilton with our map and control panel</p>
</header>
<div class="container-fluid text-center">
<div class="row">
<div class="col-sm-9 map-container">
<div id="map"></div>
</div>
<div class="col-sm-3 controls-container">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">Tourist places</h5>
<p class="card-text">The most beautiful places in Hamilton just a click away</p>
<div class="d-grid gap-2 d-md-block">
<button class="btn btn-primary" id="add_hotels">
<img src="images/hotel.png" alt="icon" style="width: 20px; height: 20px; margin-right: 5px;">
Hotels
</button>
<button class="btn btn-primary" id="add_restaurants">
<img src="images/restaurant.png" alt="icon" style="width: 20px; height: 20px; margin-right: 5px;">
Restaurants
</button>
<button class="btn btn-primary" id="add_waterfalls">
<img src="images/waterfalls.png" alt="icon" style="width: 20px; height: 20px; margin-right: 5px;">
Waterfalls
</button>
<button class="btn btn-primary" id="add_my_location">
<img src="images/my-location.png" alt="icon" style="width: 20px; height: 20px; margin-right: 5px;">
My Location
</button>
</div>
<div class="form-floating mb-3">
<input type="text" class="form-control" id="floatingInput" placeholder="Address">
<label for="floatingInput">Enter Address to Place Marker</label>
</div>
<button class="btn btn-primary" id="find_my_address">
<img src="images/address-icon.png" alt="icon" style="width: 20px; height: 20px; margin-right: 5px;">
Find My Address
</button>
<div class="card mt-3">
<div class="card-body" id="infowindow"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="bg-dark text-white text-center py-3">
<p class="mb-0">© 2024 Alexander Hernandez</p>
<p class="mb-0">Mohawk College</p>
</footer>
<script>
require('dotenv').config();
const apiKey = process.env.GOOGLE_MAPS_API_KEY;
function loadGoogleMapsScript(apiKey) {
const script = document.createElement('script');
script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&loading=async&callback=initMap&libraries=marker`;
script.async = true;
document.head.appendChild(script);
}
loadGoogleMapsScript(apiKey);
</script>
</body>
</html>