fix(tours): Google Maps follows a tour on foot or by bike, CoMaps only gets a route it can follow (#2812)

The Google link carried no mode, so a hike opened as a drive, and a stop on
the equator or the prime meridian was dropped. CoMaps routes a start and an
end only; a tour with stops between would reach it as unrouted pins.
This commit is contained in:
Maurice
2026-11-13 10:49:28 +01:00
parent fcbb538c24
commit 5f6594f697
5 changed files with 50 additions and 9 deletions
@@ -72,7 +72,7 @@ export function dayRouteTargets(stops: NamedWaypoint[], profile: RouteProfileKey
const push = (target: Omit<DayRouteTarget, 'url'>, url: string | null) => {
if (url) out.push({ ...target, url });
};
push({ id: 'google', label: 'Google Maps' }, generateGoogleMapsUrl(stops));
push({ id: 'google', label: 'Google Maps' }, generateGoogleMapsUrl(stops, profile));
if (showsAppleMaps()) push({ id: 'apple', label: 'Apple Maps' }, generateAppleMapsUrl(stops, profile));
push({ id: 'comaps', label: 'CoMaps' }, generateCoMapsUrl(stops, profile));
const located = stops.filter((p) => p.lat != null && p.lng != null).length;