Get position of buses approaching a stop.
This commit is contained in:
parent
4ffef02bb9
commit
87932b8801
1 changed files with 10 additions and 0 deletions
|
@ -133,4 +133,14 @@ function getPositionOfLine($line,$direction){
|
|||
return $locations;
|
||||
}
|
||||
|
||||
function getPositionOfApproachingStop($stop,$direction){
|
||||
$res = array();
|
||||
foreach(getRoutesByStop($stop,$direction) as $route){
|
||||
foreach(getPositionOfRoute($route,$direction) as $bus){
|
||||
array_push($res, $bus);
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Reference in a new issue