aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2026-02-05 13:26:18 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2026-02-05 13:26:18 +0100
commitfa3017574b830ee18cadc6bfe1cd9a465f48e555 (patch)
treedd318fd0b6901593458432086e957fa659f9443a /src
parent7a680e6b1bd234d261909f77b06e58033a3824cb (diff)
Better unknown feed handling, handle UVIGO shuttle
Diffstat (limited to 'src')
-rw-r--r--src/Enmarcha.Backend/Controllers/TileController.cs4
-rw-r--r--src/Enmarcha.Backend/Controllers/TransitController.cs2
-rw-r--r--src/frontend/app/routes/map.tsx5
-rw-r--r--src/frontend/app/routes/routes.tsx2
4 files changed, 8 insertions, 5 deletions
diff --git a/src/Enmarcha.Backend/Controllers/TileController.cs b/src/Enmarcha.Backend/Controllers/TileController.cs
index 3fdedfb..44a2473 100644
--- a/src/Enmarcha.Backend/Controllers/TileController.cs
+++ b/src/Enmarcha.Backend/Controllers/TileController.cs
@@ -191,10 +191,10 @@ public class TileController : ControllerBase
{
return feedId switch
{
- "vitrasa" or "tussa" or "tranvias" => "bus",
+ "vitrasa" or "tussa" or "tranvias" or "shuttle" => "bus",
"xunta" => "coach",
"renfe" or "feve" => "train",
- _ => throw new ArgumentException("Feed ID not a known type", feedId)
+ _ => "unknown"
};
}
diff --git a/src/Enmarcha.Backend/Controllers/TransitController.cs b/src/Enmarcha.Backend/Controllers/TransitController.cs
index a0b8e39..93129f9 100644
--- a/src/Enmarcha.Backend/Controllers/TransitController.cs
+++ b/src/Enmarcha.Backend/Controllers/TransitController.cs
@@ -42,7 +42,7 @@ public class TransitController : ControllerBase
using var activity = Telemetry.Source.StartActivity("GetRoutes");
if (feeds.Length == 0)
{
- feeds = ["tussa", "vitrasa", "tranvias", "feve"];
+ feeds = ["tussa", "vitrasa", "tranvias", "feve", "shuttle"];
}
activity?.SetTag("feeds", string.Join(",", feeds));
diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx
index 07a805d..a8d745e 100644
--- a/src/frontend/app/routes/map.tsx
+++ b/src/frontend/app/routes/map.tsx
@@ -111,7 +111,10 @@ export default function StopMap() {
};
const stopLayerFilter = useMemo(() => {
- const filter: any[] = ["any"];
+ const filter: any[] = [
+ "any",
+ ["==", ["get", "transitKind"], "unknown"]
+ ];
if (showCitybusStops) {
filter.push(["==", ["get", "transitKind"], "bus"]);
}
diff --git a/src/frontend/app/routes/routes.tsx b/src/frontend/app/routes/routes.tsx
index 5f02b70..6d50186 100644
--- a/src/frontend/app/routes/routes.tsx
+++ b/src/frontend/app/routes/routes.tsx
@@ -14,7 +14,7 @@ export default function RoutesPage() {
const { data: routes, isLoading } = useQuery({
queryKey: ["routes"],
- queryFn: () => fetchRoutes(["tussa", "vitrasa", "tranvias", "feve"]),
+ queryFn: () => fetchRoutes(["vitrasa", "tranvias", "tussa", "feve", "shuttle"]),
});
const filteredRoutes = routes?.filter(