forked from zoejw/buses
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuses.html
More file actions
executable file
·45 lines (34 loc) · 925 Bytes
/
buses.html
File metadata and controls
executable file
·45 lines (34 loc) · 925 Bytes
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
<!DOCTYPE html>
<html>
<!-- google maps library -->
<script src="http://maps.google.com/maps/api/js"></script>
<!-- google map element -->
<div id="map" style="width:1024px; height:768px"></div>
<script src="utilities.js"></script>
<script>
// ------------------------------------
// single bus - static
// ------------------------------------
// YOUR CODE
var showBuses = function() {
var locations = getBusLocations();
var bus = null;
var length = locations.vehicle.length;
for (var i = 0; i < length; i++) {
bus = locations.vehicle[i];
addMarkers(bus);
}
console.log(new Date());
}
showBuses();
setInterval(showBuses,15000);
// ------------------------------------
// all buses - static
// ------------------------------------
// YOUR CODE
// ------------------------------------
// all buses - timer
// ------------------------------------
// YOUR CODE
</script>
</html>