Only download the requested bus data dynamically.
This commit is contained in:
parent
feb5cb4af7
commit
2c1bd918de
1 changed files with 2 additions and 5 deletions
|
@ -114,12 +114,9 @@ function getLines(){
|
|||
}
|
||||
|
||||
function getPositionOfRoute($rt,$direction){
|
||||
global $buspositions;
|
||||
$locations = array();
|
||||
foreach ($buspositions as $bus){
|
||||
if($bus["routeid"] == $rt && $bus["direction"] == $direction){
|
||||
array_push($locations,array($bus["lat"],$bus["lon"]));
|
||||
}
|
||||
foreach (BusPosition($rt,$direction) as $bus){
|
||||
array_push($locations,array($bus["lat"],$bus["lon"]));
|
||||
}
|
||||
return $locations;
|
||||
}
|
||||
|
|
Reference in a new issue