From 8c2a4ee19ba6daf1526f8e1a15ae4de1cb7a333e Mon Sep 17 00:00:00 2001 From: steven Date: Tue, 25 Mar 2025 17:18:11 -0400 Subject: [PATCH] keep popup when bus moves --- app.py | 2 +- templates/map.html | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index ada8aa7..ceb3da0 100644 --- a/app.py +++ b/app.py @@ -22,7 +22,7 @@ def favicon(): @cache.cached(timeout=5) def tarc(): d=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs="+routes).json() - return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['OnBoard']},{v['DirectionLong']},{v['Speed']}" for v in d) + return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['OnBoard']},{v['DirectionLong']},{v['Speed']},{v['LastUpdated'][6:16]}" for v in d) if __name__ == '__main__': app.run() diff --git a/templates/map.html b/templates/map.html index 9a4b3b2..311e934 100644 --- a/templates/map.html +++ b/templates/map.html @@ -15,25 +15,27 @@