From 2128ad7da9fe16741505a7e4d641cc63cdc232f3 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Wed, 30 Oct 2024 12:14:02 -0400 Subject: [PATCH 1/3] support naming and keying transit vehicle overlay --- lib/components/map/default-map.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/components/map/default-map.tsx b/lib/components/map/default-map.tsx index 5548f8171..99caa0490 100644 --- a/lib/components/map/default-map.tsx +++ b/lib/components/map/default-map.tsx @@ -318,6 +318,10 @@ class DefaultMap extends Component { const baseLayerUrls = baseLayersWithNames?.map((bl) => bl.url) const baseLayerNames = baseLayersWithNames?.map((bl) => bl.name) + const routeBasedTransitVehicleOverlayNameOverride = overlays.find( + (o) => o.type === 'vehicles-one-route' + )?.name + return ( - + { getCurrentPosition(intl) From 6cc7abae839dbddc24c7c1e5f89a0ed46fd619ef Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Wed, 13 Nov 2024 15:34:42 -0500 Subject: [PATCH 2/3] address pr feedback --- lib/components/map/default-map.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/components/map/default-map.tsx b/lib/components/map/default-map.tsx index 99caa0490..1eb602d99 100644 --- a/lib/components/map/default-map.tsx +++ b/lib/components/map/default-map.tsx @@ -318,9 +318,8 @@ class DefaultMap extends Component { const baseLayerUrls = baseLayersWithNames?.map((bl) => bl.url) const baseLayerNames = baseLayersWithNames?.map((bl) => bl.name) - const routeBasedTransitVehicleOverlayNameOverride = overlays.find( - (o) => o.type === 'vehicles-one-route' - )?.name + const routeBasedTransitVehicleOverlayNameOverride = + overlays.find((o) => o.type === 'vehicles-one-route')?.name || undefined return ( @@ -346,10 +345,10 @@ class DefaultMap extends Component { Date: Mon, 25 Nov 2024 13:36:08 -0800 Subject: [PATCH 3/3] fix bug causing percy crash --- lib/components/map/default-map.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/map/default-map.tsx b/lib/components/map/default-map.tsx index 36afaab11..00a552a81 100644 --- a/lib/components/map/default-map.tsx +++ b/lib/components/map/default-map.tsx @@ -320,7 +320,7 @@ class DefaultMap extends Component { const baseLayerNames = baseLayersWithNames?.map((bl) => bl.name) const routeBasedTransitVehicleOverlayNameOverride = - overlays.find((o) => o.type === 'vehicles-one-route')?.name || undefined + overlays?.find((o) => o.type === 'vehicles-one-route')?.name || undefined return (