-
Notifications
You must be signed in to change notification settings - Fork 0
/
Details.html
executable file
·213 lines (179 loc) · 6.98 KB
/
Details.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Find My Spot Philly</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lora:400,400i,700,700i" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="assets/css/business-casual.css" rel="stylesheet">
<script src="https://www.gstatic.com/firebasejs/4.11.0/firebase.js"></script>
<style>
h4 {
padding: 38px;
width: 100%;
background-color: whitesmoke;
margin-top: 5px;
border: 2px solid darkblue;
font-family: 'Times New Roman', Times, serif;
}
#details {
margin-top: 8rem;
}
h3 {
height: 600px;
background-color: whitesmoke;
width: 100%;
font-size: 500px;
;
text-align: center;
}
hr {
border: 2px solid;
}
th,
td {
border-bottom: 2px solid;
height: 50px;
width: 200px;
}
#map {
height: 400px;
width: 100%;
}
</style>
</head>
<body>
<h1 class="site-heading text-center text-white d-none d-lg-block">
<span class="site-heading-upper text-primary mb-3">Living Large in the City of Brotherly Love</span>
<span class="site-heading-lower">Bang for My Buck</span>
</h1>
<section class="page-section about-heading">
<div class="container" id="details-page">
<div id="map">
</div>
<div class="about-heading-content">
<div class="row" id="details">
<div class="col-xl-7 col-lg-7 mx-auto">
<div class="row">
<div class="col-xl-12">
<h4>City Name :
<hr>
<p id="cityName"></p>
</h4>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<h4>Median Income :
<hr>
<p id="medianIncome"></p>
</h4>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<h4>Median Rent :
<hr>
<p id="medianRent"></p>
</h4>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<h4>
<table>
<tr>
<td></td>
<th>Male</th>
<th>Female</th>
</tr>
<tr>
<td>Median Age</td>
<td id="maleAge"></td>
<td id="femaleAge"></td>
</tr>
<tr>
<td>Occupation</td>
<td id="maleOcp"></td>
<td id="femaleOcp"></td>
</tr>
<tr>
<td>Population</td>
<td id="malePop"></td>
<td id="femalePop"></td>
</tr>
</table>
</h4>
</div>
</div>
</div>
<div class="col-xl-5 col-lg-5 mx-auto">
<div class="place">
<h3>?</h3>
</div>
</div>
</div>
</div>
<div style="margin: 10px;" class="btn btn-light">
<a class="" href="index.html">Return to Home</a>
</div>
</div>
</section>
<footer class="footer text-faded text-center py-5">
<div class="container">
<p class="m-0 small">Copyright © Your Website 2018</p>
</div>
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS file for this template, firebase DB has been intergrated -->
<!-- <script src="assets/js/logic.js"></script> -->
<script src="assets/js/maps.js"></script>
</body>
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 12,
center: {
lat: 39.952583,
lng: -75.165222
}
});
var geocoder = new google.maps.Geocoder();
geocodeAddress(geocoder, map);
}
function geocodeAddress(geocoder, resultsMap) {
var link = window.location.href;
var url = new URL(link);
var address;
if (url.searchParams.get("package") === null) {
address = "Center City, Philadelphia";
} else {
address = url.searchParams.get("package") + ", Philadelphia";
}
console.log(address);
geocoder.geocode({
'address': address
}, function(results, status) {
if (status === 'OK') {
resultsMap.setCenter(results[0].geometry.location);
resultsMap.setZoom(15)
var marker = new google.maps.Marker({
map: resultsMap,
position: results[0].geometry.location
});
} else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
}
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC_1lbdtBKugEcIftvmkwIE4nYKr5piAyA&callback=initMap">
</script>
</html>