diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-08 01:37:10 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-08 01:37:10 +0100 |
| commit | 107295575e3a7c37911ae192baf426b0003975a4 (patch) | |
| tree | ceb528a428716d5313517a0fa72fcac3ea1360fb /src/frontend/app/config/RegionConfig.ts | |
| parent | 3b3fd2f6880eaa9170b480d41d43311925483bea (diff) | |
Refactor code structure for improved readability and maintainability; removed redundant code blocks and optimized functions.
Diffstat (limited to 'src/frontend/app/config/RegionConfig.ts')
| -rw-r--r-- | src/frontend/app/config/RegionConfig.ts | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/frontend/app/config/RegionConfig.ts b/src/frontend/app/config/RegionConfig.ts index 4677509..43fe70a 100644 --- a/src/frontend/app/config/RegionConfig.ts +++ b/src/frontend/app/config/RegionConfig.ts @@ -1,6 +1,26 @@ import type { LngLatLike } from "maplibre-gl"; -export const REGION_DATA = { +export type RegionId = "vigo"; + +export interface RegionData { + id: RegionId; + name: string; + stopsEndpoint: string; + estimatesEndpoint: string; + consolidatedCirculationsEndpoint: string; + timetableEndpoint: string; + shapeEndpoint: string; + defaultCenter: LngLatLike; + bounds: { + sw: LngLatLike; + ne: LngLatLike; + }; + textColour: string; + defaultZoom: number; + showMeters: boolean; +} + +export const REGION_DATA: RegionData = { id: "vigo", name: "Vigo", stopsEndpoint: "/stops/vigo.json", @@ -20,3 +40,6 @@ export const REGION_DATA = { defaultZoom: 14, showMeters: true, }; + +export const getAvailableRegions = (): RegionData[] => [REGION_DATA]; + |
