forked from pranavrc/chennairail
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
71 lines (63 loc) · 3.02 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
<!DOCTYPE html>
<html>
<head>
<title>Chennai Suburban Rail Map</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=false;">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDg_NuTLeaUr7PkWpwZZPk3DpU6KfkLWFw&sensor=false"></script>
<script src="transit-min.js"></script>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map > #transitplug {
z-index: 99;
position: absolute;
bottom: 1%;
font-weight: bold;
width: 100%;
text-align: center;
}
#transitplug a {
color: #800000;
}
</style>
<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-44037342-1', 'onloop.net');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="map" style="width:100%;height:100%;">
</div>
<script>
var timezone = "+5:30:00";
var schedule = "";
// Load Sunday schedule if IST is on a Sunday.
schedule = (transit.dayInTimezone(timezone) != 0) ? "chennai_rail_schedule.json" :
"chennai_rail_schedule_sunday.json";
// If client is on a handheld device, increase the refresh interval for responsiveness.
if (!transit.isMobileDevice()) {
$("#map").append('<div id="transitplug">© <a href="http://onloop.net/" target="_blank">Pranav Ravichandran</a>. <a href="https://github.com/pranavrc/chennairail/" target="_blank">Made</a> with <a href="http://onloop.net/transit/" target="_blank">transit.js</a>. No trains run between (roughly) 18:30-23:30 UTC (00:00-05:00 IST).</div>');
transit.initialize("#map",
"chennai_rail_map.kml",
"https://raw.github.com/pranavrc/chennairail/gh-pages/chennai_rail_map.kml",
schedule);
} else {
transit.initialize("#map",
"chennai_rail_map.kml",
"https://raw.github.com/pranavrc/chennairail/gh-pages/chennai_rail_map.kml",
schedule, false, true,
5);
}
</script>
</body>
</html>