From 0197a19973940d40a373b8aa68b2791391149cef Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Thu, 25 Dec 2025 02:37:21 +0100 Subject: Implement selecting stop layers to display --- src/frontend/app/components/stop/StopMapModal.tsx | 343 +++++++++++----------- 1 file changed, 170 insertions(+), 173 deletions(-) (limited to 'src/frontend/app/components/stop') diff --git a/src/frontend/app/components/stop/StopMapModal.tsx b/src/frontend/app/components/stop/StopMapModal.tsx index 2e091b1..757411e 100644 --- a/src/frontend/app/components/stop/StopMapModal.tsx +++ b/src/frontend/app/components/stop/StopMapModal.tsx @@ -9,7 +9,6 @@ import { Layer, Marker, Source, type MapRef } from "react-map-gl/maplibre"; import { Sheet } from "react-modal-sheet"; import { useApp } from "~/AppContext"; import { AppMap } from "~/components/shared/AppMap"; -import { APP_CONSTANTS } from "~/config/constants"; import { getLineColour } from "~/data/LineColors"; import type { Stop } from "~/data/StopDataProvider"; import "./StopMapModal.css"; @@ -370,8 +369,6 @@ export const StopMapModal: React.FC = ({ showTraffic={false} attributionControl={{ compact: false, - customAttribution: - "Concello de Vigo & Viguesa de Transportes SL", }} onMove={(e) => { if (e.originalEvent) { @@ -395,180 +392,180 @@ export const StopMapModal: React.FC = ({ }} > {/* Previous Shape Layer */} - {previousShapeData && selectedBus && ( - - {/* 1. Black border */} - - {/* 2. White background */} - - {/* 3. Colored dashes */} - - - )} - - {/* Shape Layer */} - {shapeData && selectedBus && ( - - - - - {/* Stops Layer */} - - - )} - - {/* Stop marker */} - {stop.latitude && stop.longitude && ( - -
- - - - - - - - - - -
-
- )} - - {/* Selected bus marker */} - {selectedBus?.currentPosition && ( - + {/* 1. Black border */} + + {/* 2. White background */} + + {/* 3. Colored dashes */} + + + )} + + {/* Shape Layer */} + {shapeData && selectedBus && ( + + + + + {/* Stops Layer */} + + + )} + + {/* Stop marker */} + {stop.latitude && stop.longitude && ( + +
+ + + + + + + + + + +
+
+ )} + + {/* Selected bus marker */} + {selectedBus?.currentPosition && ( + +
-
- - - -
- - )} - + + +
+
+ )} + {/* Floating controls */}
-- cgit v1.3