-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
215 lines (215 loc) · 9.34 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
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
214
215
<!DOCTYPE html>
<html data-ng-app="transitApp">
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>Miami-Dade Transit</title>
<link href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<link href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="vendor/leaflet-awesome/leaflet.awesome-markers.css">
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="vendor/leaflet-awesome/leaflet.awesome-markers.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD8D11NU8OXfx8VqjFDR0pLcL8SK0n2ZH8"></script>
<script src="googlemaps/Google.js"></script>
<script src="googlemaps/GoogleTraffic.js"></script>
<!--Add button to locate the current user-->
<script src="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-locatecontrol/v0.24.0/L.Control.Locate.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-locatecontrol/v0.24.0/L.Control.Locate.css" rel="stylesheet">
<!--[if lt IE 9]>
<link href="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-locatecontrol/v0.21.0/L.Control.Locate.ie.css" rel="stylesheet" />
<![endif]-->
<!--Add full-screen map control-->
<script src="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v0.0.4/Leaflet.fullscreen.min.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v0.0.4/leaflet.fullscreen.css" rel="stylesheet">
<link href="styles.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" data-toggle="tab" href="#mapWrapper">Miami-Dade Transit Live</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a data-toggle="tab" href="#mapWrapper">Map</a>
</li>
<li>
<a data-toggle="tab" href="#livebuses">Live Buses</a>
</li>
<li>
<a data-toggle="tab" href="#busroutes">Bus Routes</a>
</li>
<li>
<a data-toggle="tab" href="#busstops">Bus Stops</a>
</li>
<li>
<a data-toggle="tab" href="#POIs">Points of Interest</a>
</li>
<li>
<a data-toggle="tab" href="#trolleys">Trolleys</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/Code-for-Miami/LeafletTransit" target="_blank">Github</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="tab-content" data-ng-controller="transitController">
<div class="tab-pane fade in active" id="mapWrapper">
<div id="map"></div>
</div>
<div class="tab-pane fade in overflow-y" id="livebuses">
<div class="container">
<h1>Live Buses <small>{{buses.length}}</small></h1>
<div id="busTable">
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Bus ID</th>
<th>Trip ID</th>
<th>Route ID</th>
<th>Service Direction</th>
<th>Description</th><!--<th>Route Color</th>-->
<th>Last Updated</th>
</tr>
<tr data-ng-repeat="x in buses">
<td>{{x.BusID}}</td>
<td>{{x.TripID}}</td>
<td><button class="btn btn-primary" onclick="focusRoute(this.innerHTML)">{{x.RouteID}}</button></td>
<td>{{x.ServiceDirection}}</td>
<td><button class="btn btn-primary" id="{{x.BusID}}" onclick="focusBus(this.id)">{{x.TripHeadsign}}</button></td><!--<td style="background-color: #{{x.color}}">{{x.color}}</td>-->
<td>{{x.LocationUpdated}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="tab-pane fade overflow-y" id="busroutes">
<div class="container">
<h1>Bus Routes <small>{{routes.length}}</small></h1>
<div id="busroutesTable">
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Route ID</th>
<th>Route Alias</th>
<th>Route Description</th>
<th>Route Color</th>
</tr>
<tr data-ng-repeat="x in routes">
<td><button class="btn btn-primary" onclick="focusRoute(this.innerHTML)">{{x.RouteID}}</button></td>
<td>{{x.RouteAliasLong}}</td>
<td>{{x.RouteDescription}}</td>
<td style="background-color: #{{x.RouteColor}}">{{x.RouteColor}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="tab-pane fade overflow-y" id="busstops">
<div class="container">
<h1>Bus Stops <small>{{busStops[routeDir].length}}</small></h1>
Route: <select onchange="routeChanged(this.value)">
<option data-ng-repeat="x in uniqueBusRoutes" value="{{x.RouteID}} {{x.ServiceDirection}}">
{{x.RouteID}} {{x.ServiceDirection}}
</option>
</select>
<div id="busStopTable">
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Sequence</th>
<th>Stop ID</th>
<th>Stop Name</th>
</tr>
<tr data-ng-repeat="x in busStops[routeDir]">
<td>{{x.Sequence}}</td>
<td>{{x.StopID}}</td>
<td>{{x.StopName}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="tab-pane fade overflow-y" id="POIs">
<div class="container">
<h1>Points of Interest <small>{{POIs.length}}</small></h1>
<div id="POIsTable">
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>POI ID</th>
<th>Category</th>
<th>Category Name</th>
<th>Name</th>
<th>Address</th>
<th>svHeading</th>
</tr>
<tr data-ng-repeat="x in POIs">
<td>{{x.PointID}}</td>
<td><!--<img height="33" src="icons/icon-POI-{{x.CategoryID}}.png" width="33">-->{{x.CategoryID}}</td>
<td>{{x.CategoryName}}</td>
<td><button class="btn btn-primary" id="{{x.PointID}},{{x.Latitude}},{{x.Longitude}}" onclick="focusPOI(this.id)">{{x.PointName}}</button></td>
<td>{{x.Address}}, {{x.City}}, {{x.State}} {{x.Zip}}</td>
<td>{{x.svHeading}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="tab-pane fade overflow-y" id="trolleys">
<div class="container">
<h1>City of Miami Trolleys <small>{{trolleys.length}}</small></h1>
<div id="trolleysTable">
<div class="table-responsive">
<table class="table table-striped table-hover">
<tr>
<th>Trolley ID</th>
<th>Route ID</th>
<th>In Service</th>
<th>Next Stop ID</th>
<th>Schedule Number</th>
<th>Receive Time</th>
</tr>
<tr data-ng-repeat="x in trolleys">
<td>{{x.equipmentID}}</td>
<td>{{x.routeID}}</td>
<td>{{x.inService}}</td>
<td>{{x.nextStopID}}</td>
<td>{{x.scheduleNumber}}</td>
<td>{{x.receiveTime}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="bottom" style="margin-left: auto; margin-right: auto; width: 50%; padding: 20px 0px 0px 0px">
<p>Data retrieved from: <a href="http://www.miamidade.gov/transit/WebServices/Buses/?BusID=" target="_blank">http://www.miamidade.gov/transit/WebServices/Buses/?BusID=</a><br>
When data is unavailable (night-time), no live buses are shown.</p>
</div><!-- All Javascript code to display the buses on the map -->
<script src="index.js"></script>
</body>
</html>