diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-02-11 18:18:13 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-02-11 18:18:13 +0100 |
| commit | f3a8efbacf185638cacea0693824d9de894c89b3 (patch) | |
| tree | c7bc56f74a8738e09963656895448df50df39417 /src/Enmarcha.Backend/Controllers | |
| parent | 58d309b69bcc80a215c4fd6f38044b820d4f3674 (diff) | |
refactor: Remove unused logging and streamline stop data handling in map and processor components
Diffstat (limited to 'src/Enmarcha.Backend/Controllers')
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/TileController.cs | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/Enmarcha.Backend/Controllers/TileController.cs b/src/Enmarcha.Backend/Controllers/TileController.cs index 44a2473..856f2c6 100644 --- a/src/Enmarcha.Backend/Controllers/TileController.cs +++ b/src/Enmarcha.Backend/Controllers/TileController.cs @@ -5,7 +5,6 @@ using NetTopologySuite.IO.VectorTiles.Mapbox; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; -using System.Text.Json; using Enmarcha.Sources.OpenTripPlannerGql; using Enmarcha.Sources.OpenTripPlannerGql.Queries; using Enmarcha.Backend.Configuration; @@ -126,36 +125,7 @@ public class TileController : ControllerBase { "code", $"{idParts[0]}:{codeWithinFeed}" }, { "name", _feedService.NormalizeStopName(feedId, stop.Name) }, { "icon", GetIconNameForFeed(feedId) }, - { "transitKind", GetTransitKind(feedId) }, - // Routes - { "routes", JsonSerializer - .Serialize( - distinctRoutes.Select(r => { - var colour = r.Color ?? Color; - string textColour; - - if (r.Color is null) // None is present, use fallback - { - textColour = TextColor; - } - else if (r.TextColor is null || r.TextColor.EndsWith("000000")) - { - // Text colour not provided, or default-black; check the better contrasting - textColour = ContrastHelper.GetBestTextColour(colour); - } - else - { - // Use provided text colour - textColour = r.TextColor; - } - - return new { - shortName = r.ShortName, - colour, - textColour - }; - })) - } + { "transitKind", GetTransitKind(feedId) } } }; |
