Add map displaying all buses of a line.
This commit is contained in:
parent
2aaa44347b
commit
ed11c30b1f
1 changed files with 10 additions and 0 deletions
10
ShowLine.php
10
ShowLine.php
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
<title>DataBus - ShowLine</title>
|
||||
<?php include 'modules/head.php'; ?>
|
||||
<?php include 'modules/map.php'; ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php include 'modules/nav.php'; ?>
|
||||
|
@ -25,6 +26,12 @@ if (isValidLine($_GET["line"])){
|
|||
}
|
||||
|
||||
function PrintRoutes($line){
|
||||
echo '<ul class="nav nav-tabs" role="tablist" >';
|
||||
echo '<li role="presentation" class="active"><a href="#routes" aria-controls="routes" data-toggle="tab" role="tab">Routes</a></li>';
|
||||
echo '<li role="presentation"><a href="#map" onclick="setTimeout(function(){map.updateSize();}, 200);" aria-controls="map" data-toggle="tab" role="tab">Map</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<div class="tab-content">';
|
||||
echo '<div id="routes" class="tab-pane fade in active" role="tabpanel">';
|
||||
$routes = getRoutesOfLine($line);
|
||||
echo '<table class="table table-striped table-bordered"><thead><tr>';
|
||||
echo '<th>Route #</th><th>Route Name</th>';
|
||||
|
@ -34,6 +41,9 @@ function PrintRoutes($line){
|
|||
echo '<td><a href="ShowRoute.php?route=' . $route['id'] . '">' . $route['name'] . '</a></td></tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
echo '</div><div id="map" class="tab-pane fade" role="tabpanel">';
|
||||
ShowMap(getPositionOfLine($line));
|
||||
echo '</div></div>';
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
Reference in a new issue