-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
128 lines (108 loc) · 3.31 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Subway Observatory</title>
<meta name="description" content="Subway Observatory">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<link rel="stylesheet" href="css/styles.css?v=1.0">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class='header'>
<div class='imagen'>
<img src='http://www.alstom.com/Global/OneAlstomPlus/Railsystems/Pressreleases/March%202016/20160503--metropolis%20sbase---800x360.jpg'/>
</div>
<div class='title'>
<h1>
Subway Observatory
</h1>
</div>
</div>
<div class='buttons'>
<button class="lineA">
<p>
A Line
</p>
</button>
<button class="lineB">
<p>
B Line
</p>
</button>
<button class="lineC">
<p>
C Line
</p>
</button>
<button class="lineD">
<p>
D Line
</p>
</button>
<button class="lineE">
<p>
E Line
</p>
</button>
<button class="lineH">
<p>
H Line
</p>
</button>
</div>
<div class='dataBox' >
<div class='leftColumn'>
<div class='firstStation'>
First station: San Pedrito
</div>
<div class='lastStation'>
Last station: Plaza de Mayo
</div>
</div>
<div class='rightColumn'>
<div class='meanWait'>
Mean waiting time: 3:21 minutes
</div>
<div class='trip'>
Full trip: 26 minutes
</div>
</div>
</div>
<div class = 'delayPlot'>
<img id="delayPlotId" src='https://raw.githubusercontent.com/alephcero/baSubwayObservatory/master/img/plotLineA.png'/>
</div>
<div id = 'mapContainer'>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="GeoJSONdata/data.js"></script>
<script>
//instanciate leaflet map
var map = L.map('mapContainer').setView([-34.602889, -58.442420], 12);
var layer = L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, ©<a href="https://carto.com/attribution">CARTO</a>'
}).addTo(map);
L.geoJSON(subwayLines, {
style: function(feature) {
switch (feature.properties.LINEASUB) {
case "LINEA A": return {color: "#1e90ff","weight": 5,"opacity": 0.65};
case "LINEA B": return {color: "#b22222","weight": 5,"opacity": 0.65};
case "LINEA C": return {color: "#0000cd","weight": 5,"opacity": 0.65};
case "LINEA D": return {color: "#266a2e","weight": 5,"opacity": 0.65};
case "LINEA E": return {color: "#800080","weight": 5,"opacity": 0.65};
case "LINEA H": return {color: "#ffd700","weight": 5,"opacity": 0.65};
}
},
filter: function(feature, layer) {
return feature.properties.show_on_map;
}
}
).addTo(map);
</script>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
<script src="js/scripts.js"></script>
</body>
</html>