From 869181433015ab68189498da533e48c8df419005 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 31 May 2026 22:35:58 +0200 Subject: [PATCH] Render GPX and route overlays once the Mapbox style has loaded (#1036) The GPX and route geojson effects ran before the map 'load' event had attached their sources, so on the first paint they hit the early return and never re-ran. Add mapReady to their dependencies so they fire again the moment the sources exist. --- client/src/components/Map/MapViewGL.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Map/MapViewGL.tsx b/client/src/components/Map/MapViewGL.tsx index 73f50f1c..e86f75ee 100644 --- a/client/src/components/Map/MapViewGL.tsx +++ b/client/src/components/Map/MapViewGL.tsx @@ -447,7 +447,7 @@ export function MapViewGL({ geometry: { type: 'LineString' as const, coordinates: seg.map(([lat, lng]) => [lng, lat]) }, })) src.setData({ type: 'FeatureCollection', features }) - }, [route]) + }, [route, mapReady]) // Travel times now live in the day sidebar (per-segment connectors), not on the map. @@ -470,7 +470,7 @@ export function MapViewGL({ } catch { return [] } }) src.setData({ type: 'FeatureCollection', features }) - }, [places]) + }, [places, mapReady]) // Reservation overlay — mirrors the Leaflet ReservationOverlay: great- // circle arcs for flights/cruises, straight lines for trains/cars,