-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparent_mobile.html
244 lines (235 loc) · 9.52 KB
/
parent_mobile.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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<html>
<head>
<title>UK Rail Map - Parent</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/leaflet.css" />
<link rel="stylesheet" href="css/groupedlayercontrol.css" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/leaflet.js"></script>
<script src="js/groupedlayercontrol.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
.leaflet-control-layers {
max-height: auto;
overflow: auto;
width: auto ;
}
</style>
</head>
<body style="padding: 0; margin: 0;">
<div id="map" style="width: 100%; height: 100%; padding: 0; margin: 0; background: #fff;"></div>
<script src="parent_js/Abellio.js"></script>
<script src="parent_js/Arriva.js"></script>
<script src="parent_js/ArrivaMTR.js"></script>
<script src="parent_js/First.js"></script>
<script src="parent_js/Govia.js"></script>
<script src="parent_js/HeathrowAirport.js"></script>
<script src="parent_js/MTR.js"></script>
<script src="parent_js/NationalExpress.js"></script>
<script src="parent_js/SercoAbellio.js"></script>
<script src="parent_js/Serco.js"></script>
<script src="parent_js/Stagecoach.js"></script>
<script src="parent_js/TransportforLondon.js"></script>
<script src="parent_js/VirginStagecoach.js"></script><script>
var map = L.map('map', {zoomControl:false, maxZoom:15, minZoom:5, zoom:6, center:[55,-2.5]})
map.setMaxBounds([
[48, -13],
[63, 10]
]);
var basemap = L.tileLayer('http://a.tile.stamen.com/toner/{z}/{x}/{y}.png', {
attribution: ' Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
}).addTo(map);
var info2 = L.control();
info2.setPosition('topleft');
info2.onAdd = function (map) {
this._div = L.DomUtil.create('div', 'info2'); // create a div with a class "info"
this._div.innerHTML = 'View by: <b><a target="_top" href="agencies_mobile.html">Agency</a></b> || <b><a target="_top" href="parent_mobile.html">Parent Company</a></b><br>Created by: <b><a href="http://gisforthought.com/uk-rail-map/">GIS for Thought</a></b> || 2017/10/20<br>Hosting: <a href="https://www.digitalocean.com/?refcode=f67c2dabcf79" target="_blank">Digital Ocean</a> || Logic: <a href="ukrail_distinct_agencies_parent.html" target="_blank">Agency to Parent</a>';
return this._div;
};
info2.addTo(map);
var zoomer = L.control.zoom();
zoomer.addTo(map);
function moveDown(e) {
var layer = e.target;
layer.bringToBack();
}
function onEachFeature(feature, layer) {
layer.on({
click: moveDown
});
}
function style_Abellio_parent(feature) {
return {
weight: 1.6,
color: '#FFB300',
dashArray: '',
opacity: 1.0
};
}
var json_Abellio_parent_layer = new L.geoJson(json_Abellio_parent, {
onEachFeature: onEachFeature,
style: style_Abellio_parent
});
function style_Arriva_parent(feature) {
return {
weight: 1.6,
color: '#803E75',
dashArray: '',
opacity: 1.0
};
}
var json_Arriva_parent_layer = new L.geoJson(json_Arriva_parent, {
onEachFeature: onEachFeature,
style: style_Arriva_parent
});
function style_ArrivaMTR_parent(feature) {
return {
weight: 1.6,
color: '#FF6800',
dashArray: '',
opacity: 1.0
};
}
var json_ArrivaMTR_parent_layer = new L.geoJson(json_ArrivaMTR_parent, {
onEachFeature: onEachFeature,
style: style_ArrivaMTR_parent
});
function style_First_parent(feature) {
return {
weight: 1.6,
color: '#A6BDD7',
dashArray: '',
opacity: 1.0
};
}
var json_First_parent_layer = new L.geoJson(json_First_parent, {
onEachFeature: onEachFeature,
style: style_First_parent
});
function style_Govia_parent(feature) {
return {
weight: 1.6,
color: '#C10020',
dashArray: '',
opacity: 1.0
};
}
var json_Govia_parent_layer = new L.geoJson(json_Govia_parent, {
onEachFeature: onEachFeature,
style: style_Govia_parent
});
function style_HeathrowAirport_parent(feature) {
return {
weight: 1.6,
color: '#CEA262',
dashArray: '',
opacity: 1.0
};
}
var json_HeathrowAirport_parent_layer = new L.geoJson(json_HeathrowAirport_parent, {
onEachFeature: onEachFeature,
style: style_HeathrowAirport_parent
});
function style_MTR_parent(feature) {
return {
weight: 1.6,
color: '#817066',
dashArray: '',
opacity: 1.0
};
}
var json_MTR_parent_layer = new L.geoJson(json_MTR_parent, {
onEachFeature: onEachFeature,
style: style_MTR_parent
});
function style_NationalExpress_parent(feature) {
return {
weight: 1.6,
color: '#007D34',
dashArray: '',
opacity: 1.0
};
}
var json_NationalExpress_parent_layer = new L.geoJson(json_NationalExpress_parent, {
onEachFeature: onEachFeature,
style: style_NationalExpress_parent
});
function style_SercoAbellio_parent(feature) {
return {
weight: 1.6,
color: '#F6768E',
dashArray: '',
opacity: 1.0
};
}
var json_SercoAbellio_parent_layer = new L.geoJson(json_SercoAbellio_parent, {
onEachFeature: onEachFeature,
style: style_SercoAbellio_parent
});
function style_Serco_parent(feature) {
return {
weight: 1.6,
color: '#00538A',
dashArray: '',
opacity: 1.0
};
}
var json_Serco_parent_layer = new L.geoJson(json_Serco_parent, {
onEachFeature: onEachFeature,
style: style_Serco_parent
});
function style_Stagecoach_parent(feature) {
return {
weight: 1.6,
color: '#FF7A5C',
dashArray: '',
opacity: 1.0
};
}
var json_Stagecoach_parent_layer = new L.geoJson(json_Stagecoach_parent, {
onEachFeature: onEachFeature,
style: style_Stagecoach_parent
});
function style_TransportforLondon_parent(feature) {
return {
weight: 1.6,
color: '#53377A',
dashArray: '',
opacity: 1.0
};
}
var json_TransportforLondon_parent_layer = new L.geoJson(json_TransportforLondon_parent, {
onEachFeature: onEachFeature,
style: style_TransportforLondon_parent
});
function style_VirginStagecoach_parent(feature) {
return {
weight: 1.6,
color: '#FF8E00',
dashArray: '',
opacity: 1.0
};
}
var json_VirginStagecoach_parent_layer = new L.geoJson(json_VirginStagecoach_parent, {
onEachFeature: onEachFeature,
style: style_VirginStagecoach_parent
});
json_Abellio_parent_layer.addTo(map);
var groupedOverlays = {
"Parent": {
'<font color=#FFB300>■</font> Abellio': json_Abellio_parent_layer,'<font color=#803E75>■</font> Arriva': json_Arriva_parent_layer,'<font color=#FF6800>■</font> ArrivaMTR': json_ArrivaMTR_parent_layer,'<font color=#A6BDD7>■</font> First': json_First_parent_layer,'<font color=#C10020>■</font> Govia': json_Govia_parent_layer,'<font color=#CEA262>■</font> HeathrowAirport': json_HeathrowAirport_parent_layer,'<font color=#817066>■</font> MTR': json_MTR_parent_layer,'<font color=#007D34>■</font> NationalExpress': json_NationalExpress_parent_layer,'<font color=#F6768E>■</font> SercoAbellio': json_SercoAbellio_parent_layer,'<font color=#00538A>■</font> Serco': json_Serco_parent_layer,'<font color=#FF7A5C>■</font> Stagecoach': json_Stagecoach_parent_layer,'<font color=#53377A>■</font> TransportforLondon': json_TransportforLondon_parent_layer,'<font color=#FF8E00>■</font> VirginStagecoach': json_VirginStagecoach_parent_layer
}
};
var options = {groupCheckboxes: true, collapsed: true, exclusiveGroups:["Parent"]};
L.control.groupedLayers([], groupedOverlays , options).addTo(map);
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-41533238-5', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>