aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/config/RegionConfig.ts
blob: 75da06dd9d6ef2635829579f0528c69a95782968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import type { LngLatLike } from "maplibre-gl";

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",
  estimatesEndpoint: "/api/vigo/GetStopEstimates",
  consolidatedCirculationsEndpoint: "/api/vigo/GetConsolidatedCirculations",
  timetableEndpoint: "/api/vigo/GetStopTimetable",
  shapeEndpoint: "/api/vigo/GetShape",
  defaultCenter: [42.229188855975046, -8.72246955783102] as LngLatLike,
  bounds: {
    sw: [-8.951059, 42.098923] as LngLatLike,
    ne: [-8.447748, 42.3496] as LngLatLike,
  },
  textColour: "#e72b37",
  defaultZoom: 14,
  showMeters: true,
};

export const getAvailableRegions = (): RegionData[] => [REGION_DATA];