Correctly identify direction of each trip by it's final stop
[busui.git] / labs / stopBrowser.kml.php
blob:a/labs/stopBrowser.kml.php -> blob:b/labs/stopBrowser.kml.php
--- a/labs/stopBrowser.kml.php
+++ b/labs/stopBrowser.kml.php
@@ -41,7 +41,8 @@
     if ($trips) {
         foreach ($trips as $key => $row) {
             if ($key < 3) {
-                $description .= $row['route_short_name'] . ' ' . $row['route_long_name'] . ' @ ' . $row['arrival_time'] . "<br>";
+                $destination = getTripDestination($row['trip_id']);
+                $description .= $row['route_short_name'] . ' ' . $destination['stop_name'] . ' @ ' . $row['arrival_time'] . "<br>";
             }
         }
     } else {