From 4fb2fe683b75464917dec4b1a0aaee63830f3b9a Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Sun, 28 Dec 2025 15:59:32 +0100 Subject: feat: Refactor NavBar and Planner components; update geocoding services - Removed unused Navigation2 icon from NavBar. - Updated usePlanner hook to manage route history and improve local storage handling. - Enhanced PlannerApi with new fare properties and improved itinerary handling. - Added recent routes feature in StopList with navigation to planner. - Implemented NominatimGeocodingService for autocomplete and reverse geocoding. - Updated UI components for better user experience and accessibility. - Added translations for recent routes in multiple languages. - Improved CSS styles for map controls and overall layout. --- src/frontend/app/routes/map.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/frontend/app/routes/map.tsx') diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx index cccdaa3..b02c494 100644 --- a/src/frontend/app/routes/map.tsx +++ b/src/frontend/app/routes/map.tsx @@ -38,7 +38,7 @@ export default function StopMap() { const [isSheetOpen, setIsSheetOpen] = useState(false); const mapRef = useRef(null); - const { searchRoute } = usePlanner(); + const { searchRoute } = usePlanner({ autoLoad: false }); // Handle click events on clusters and individual stops const onMapClick = (e: MapLayerMouseEvent) => { @@ -58,7 +58,7 @@ export default function StopMap() { }; const stopLayerFilter = useMemo(() => { - const filter: FilterSpecification = ["any"]; + const filter: any[] = ["any"]; if (showCitybusStops) { filter.push(["==", ["get", "transitKind"], "bus"]); } @@ -68,7 +68,7 @@ export default function StopMap() { if (showTrainStops) { filter.push(["==", ["get", "transitKind"], "train"]); } - return filter; + return filter as FilterSpecification; }, [showCitybusStops, showIntercityBusStops, showTrainStops]); const getLatitude = (center: any) => @@ -119,6 +119,7 @@ export default function StopMap() { clearPickerOnOpen={true} showLastDestinationWhenCollapsed={false} cardBackground="bg-white/95 dark:bg-slate-900/90" + autoLoad={false} />