-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeatMap.html
196 lines (195 loc) · 12.2 KB
/
HeatMap.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Heat Map Data</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="./css/bootstrap.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="./js/heatmap.js"></script>
<script src="./js/leaflet-heatmap.js"></script>
<!-- Set up Google Maps Javascript API -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBdsGq2g7EJPonPoSutU98iQKL-9W3odG8&libraries=places" type="text/javascript"></script>
<!-- Default Data File -->
<script src="DataFiles/SoofaDataCambridge.js"></script>
<script src="./js/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/bootstrap.bundle.min.js"></script>
</head>
<body>
<main class="container">
<div class="row">
<h1>Soofa Map Tool</h1>
<p>Click on the map to create a draggable marker. Display heatmaps on the map by picking from 'Pick Heatmap Layers!'. Change cities by selecting from 'Pick a City'.</p>
<p><strong>Note:</strong> If the heatmaps are not displaying, change your browser's security settings.</p>
</div>
<div class="row">
<!-- Google Searchbox -->
<input class="form-control col-xs-12 col-md-6" type="text" id="mapsearch" placeholder="Enter Location for Marker">
<!-- Dropdown menu for cities. This is where you add a new city! -->
<div class="col-xs-hide col-md-3"></div>
<select class="form-control col-xs-12 col-md-3" id="selectcity">
<option value="default">Pick a City!</option>
<option value="Cambridge">Cambridge, MA</option>
<option value="Providence">Providence, RI</option>
<option value="Trenton">Trenton, NJ</option>
<option value="Cuero">Cuero, TX</option>
<option value="Portage">Portage, MI</option>
<option value="Lafayette">Lafayette, LA</option>
<option value="ArlingtonHeights">Arlington Heights, IL</option>
</select>
</div>
<hr />
<div class="row" style="/*display: flex; align-items: center*/">
<div id="mapContainer" class="col-xs-12 col-lg-8">
<!-- Set up score displays -->
<div class="heatmap" style="width: 100%; height: 500px" id="map"></div>
</div>
<div class="col-xs-12 col-lg-4">
<div class="row">
<button class="btn btn-primary btn-block" type="button" data-toggle="collapse" data-target="#collapseMenu" aria-expanded="false">Pick Heatmap Layers!</button>
</div>
<div class="row collapse" id="collapseMenu" style="background-color: white; width: 100%; border: solid 5px; position: absolute; padding: 15px; z-index: 100">
<form class="form-horizontal" id="layerselector">
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('googlefood')" />Google Food Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('googlecommunity')" />Google Community Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('googlebigshops')" />Google BigShops Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('googlesmallshops')" />Google SmallShops Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('googletransit')" />Google Transit Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('googletourist')" />Google Tourist Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('yelpfood')" />Yelp Food Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('yelpshopping')" />Yelp Shopping Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('yelpcommunity')" />Yelp Community Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" onchange="layertrigger('walkscore')" />Walk Score Data
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input id="selectAllCheckBox" type="checkbox" class="form-check-input" onchange="layertrigger('all')" />Show All Layers
</label>
</div>
</form>
</div>
<form>
<div class="form-group row">
<label for="average" class="col-10 col-form-label">Average Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="average" />
</div>
</div>
</form>
<div class="row">
<button class="btn btn-primary btn-block" type="button" data-toggle="collapse" data-target="#scoresform">Show More Scores</button>
</div>
<form id="scoresform" class="collapse">
<div class="form-group row">
<label for="googlefood" class="col-10 col-form-label">Google Food Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="googlefood" />
</div>
</div>
<div class="form-group row">
<label for="googlecommunity" class="col-10 col-form-label">Google Community Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="googlecommunity" />
</div>
</div>
<div class="form-group row">
<label for="googlebigshops" class="col-10 col-form-label">Google Big Shops Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="googlebigshops" />
</div>
</div>
<div class="form-group row">
<label for="googlesmallshops" class="col-10 col-form-label">Google Small Shops Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="googlesmallshops" />
</div>
</div>
<div class="form-group row">
<label for="googletransit" class="col-10 col-form-label">Google Transit Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="googletransit" />
</div>
</div>
<div class="form-group row">
<label for="googletourist" class="col-10 col-form-label">Google Tourist Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="googletourist" />
</div>
</div>
<div class="form-group row">
<label for="yelpfood" class="col-10 col-form-label">Yelp Food Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="yelpfood" />
</div>
</div>
<div class="form-group row">
<label for="yelpshopping" class="col-10 col-form-label">Yelp Shopping Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="yelpshopping" />
</div>
</div>
<div class="form-group row">
<label for="yelpcommunity" class="col-10 col-form-label">Yelp Community Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="yelpcommunity" />
</div>
</div>
<div class="form-group row">
<label for="walkscore" class="col-10 col-form-label">Walking Score:</label>
<div class="col-2">
<input type="text" readonly class="form-control-plaintext" id="walkscore" />
</div>
</div>
<div class="form-group row">
<label for="address" class="col-2 col-form-label">Address:</label>
<div class="col-10">
<input style="width: 100%; text-align: right" type="text" readonly class="form-control-plaintext" id="address" />
</div>
</div>
</form>
</div>
</div>
</main>
<script type="text/javascript" src="./js/functions.js"></script>
</body>
</html>