feat: add StopsMap and WalkingDirections components for enhanced map functionality
- Implemented StopsMap component to display bus stops on a map using MapLibre GL. - Integrated walking directions feature in WalkingDirections component to calculate routes from user location to selected bus stop. - Added geo utility functions for coordinate validation and distance calculation. - Created route grouping and stop filtering logic in routeGroups module. - Developed custom hooks for managing stop routes with React Query. - Added tests for routing and stop functionalities to ensure reliability.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
export type City = { id: number; name: string; slug: string };
|
||||
export type Stop = { id: number; name: string; direction: string; routesCount: number };
|
||||
export type Coordinates = { latitude: number; longitude: number };
|
||||
export type City = { id: number; name: string; slug: string } & Partial<Coordinates>;
|
||||
export type Stop = { id: number; name: string; direction: string; routesCount: number; address?: string } & Partial<Coordinates>;
|
||||
export type StopDetails = Stop & { routes: Route[] };
|
||||
export type Route = { id: number; number: string; name: string };
|
||||
export type RouteStops = { route: Route; stops: (Stop & { sequence: number })[] };
|
||||
export type WalkingRoute = { distance: number; duration: number; geometry: { type: 'LineString'; coordinates: [number, number][] } };
|
||||
export type Departure = { routeId: number; routeNumber: string; direction: string; scheduledTime: string; scheduledAt: string; note?: string; tripKey?: string };
|
||||
export type Board = { departures: Departure[]; routes: { id: number; number: string; name: string }[]; updatedAt: string; partial: boolean; date?: string; isHoliday?: boolean; holidayName?: string | null };
|
||||
export type Timetable = Board & { date: string; isHoliday: boolean; holidayName: string | null };
|
||||
|
||||
Reference in New Issue
Block a user