mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user