forked from WRI-Cities/static-GTFS-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.html
154 lines (131 loc) · 5.33 KB
/
routes.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
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Routes Management</title>
<link href="lib/leaflet.css" orig="https://unpkg.com/[email protected]/dist/leaflet.css" rel="stylesheet">
<link href="lib/jquery-ui.min.css" rel="stylesheet">
<link href="lib/tabulator.min.css" rel="stylesheet">
<link href="lib/bootstrap.v4.0.0.min.css" crossorigin="anonymous" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" rel="stylesheet">
<link rel="stylesheet" href="lib/easy-button.css" alt="https://cdn.jsdelivr.net/npm/leaflet-easybutton@2/src/easy-button.css">
<link rel="stylesheet" href="lib/chosen/chosen.min.css">
<link href="js/commonstyle.css" rel="stylesheet">
<!-- Put the CSSs first and JSs next -->
<script src="lib/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="lib/jquery-ui.min.js" type="text/javascript"></script>
<script src="lib/leaflet.js"></script>
<script src="lib/leaflet.textpath.js"></script>
<script src="lib/leaflet-ant-path.js"></script>
<script src="lib/easy-button.js" alt="https://cdn.jsdelivr.net/npm/leaflet-easybutton@2/src/easy-button.js"></script>
<script src="lib/tabulator.min.js" type="text/javascript"></script>
<script src="lib/popper.v1.12.9.min.js" crossorigin="anonymous" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" alt="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="lib/bootstrap.v4.0.0.min.js" crossorigin="anonymous" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="lib/papaparse.min.js" type="text/javascript"></script>
<script src="lib/chosen/chosen.jquery.min.js" type="text/javascript"></script>
<style>
#map0, #map1 {
height: 400px;
z-index: 0;
}
#sequence-0-table, #sequence-1-table {
height: 350px;
}
#routes-table {
height: 400px;
}
input[type=checkbox]#reverseCheck {
width: 20px; height: 20px;
-webkit-border-radius: 22px; -moz-border-radius: 22px; border-radius: 22px;
border: 1px solid #bbb;
vertical-align: middle;
}
/* Leaflet Map Overlay */
.overlaycontainer {
position: relative;
width:100%;
height: 400px;
}
#map0 {
position:absolute;
width: 100%;
}
.shapeOverlay {
position:absolute;
background-color: rgba(255,255,255,.5);
height:auto;
width: auto;
top:10px;
right:10px;
border-radius: 5px;
padding: 5px;
box-shadow:0px 0px 20px black;
}
#shapes0List .chosen-container .chosen-drop {
background-color: rgba(255,255,255,.7)!important;
}
/* for map, custom markers */
.sequence-0-divicon, .sequence-1-divicon {
border-radius: 50%;
color: white;
padding-top: 2px;
position: absolute;
text-align: center;
overflow: hidden;
box-shadow:0px 0px 10px black; /*looks 3D! no need of a border*/
}
.sequence-0-divicon {
background-color: rgba(0, 0, 255, 0.7);
}
.sequence-1-divicon {
background-color: rgba(128, 0,128,0.7);
}
/* Chosen JS autocomplete */
.chosen-search-input {
font-size: 14px;
}
</style>
</head>
<body>
<!--<script src="js/navbar.js"></script>-->
<div id="navBar"></div>
<div class="container">
<h2>Routes</h2>
<div id="instructions">
<h3>Instructions</h3>
<div>
<p><br>
1. Click on the cells of the first table to edit them.<br>
2. You can add new routes through the blue Add button just below the table. <br>
3. Save changes when done with the big green "Save.." button.</p>
<p>
Note: Changing the default sequence for a route will not change all the trips already existing under this route. The new sequence will reflect only when you create new trips. GTFS standard doesn't store a default stops sequence for a route, so this program is storing it in a separate database file called sequences.json.</p>
</div>
</div><!-- Accordion over -->
<br>
<p>Listing all the routes. You can click on any of the cells for editing.</p>
<div id="routes-table"></div>
<div class="row" style="padding-top: 5px;">
<div class="col-md-6">
<p>Add a new route: <select id="agencySelect"></select>
<button class="btn-primary btn-xs" id="addRoute" type="button">Add</button> <br>
<small id="routeAddStatus">The system will auto-generate a new route_id.</small></p>
<!-- commenting out undo-redo for now
<p>Changes: <button class="btn-xs" id="route-undo">Undo</button> |
<button class="btn-xs" id="route-redo" type="button">Redo</button> <small></small></p>
-->
</div>
<div class="col-md-6">
<button id="saveRoutes" class="btn btn-success btn-lg">Save Routes to DB</button> <small id="routeSaveStatus"></small>
<br><small>Be sure to save changes before proceeding to next tabs.</small>
</div>
</div>
<br><p><b><i>Recommended :</i></b> After setting up your routes here, assign default stop sequences and shapes to them.
<br>Go to the <a href="sequence.html" >Tools > Default Route Sequence page</a>.</p>
<p>Note: The GTFS spec natively doesn't store a default sequence for routes (that is managed per trip), but in this tool we introduced it so that it helps to have default sequence/shape when provisioning new trips.</p>
<br>
</div>
<script src="config/settings.js" type="text/javascript"></script>
<script src="js/commonfuncs.js" type="text/javascript"></script>
<script src="js/routes.js" type="text/javascript"></script>
</body>
</html>