<?php
    $positions = array();
    foreach ($routes as $route){
        print_r($route);
        foreach (BusPosition($route['id'], 'go') as $p){
            array_push($positions, $p);
        }
        foreach (BusPosition($route['id'], 'come') as $p){
            array_push($positions, $p);
        }
    }
    file_put_contents('data/buspositions.json', json_encode($positions, JSON_UNESCAPED_UNICODE));

?>
