fix(map): prevent ghost polylines and improve ETA accuracy.
- Added cancel tokens to avoid 'traces' on map after route removal. - Fixed math bug in ETA proportion calculating 16.6% less time than real. - Set average bus speed to 30km/h for more realistic calculations.
This commit is contained in:
@ -472,7 +472,7 @@ async function highlightOptimalStopForRoute() {
|
||||
if (!userCoords.value || routeStore.selectedRouteStops.length === 0) return;
|
||||
|
||||
try {
|
||||
await encontrarParadaCercana(userCoords.value, routeStore.selectedRouteStops as BusStop[], map.value || undefined);
|
||||
await encontrarParadaCercana(userCoords.value, routeStore.selectedRouteStops as BusStop[], map.value || undefined, currentCancelToken);
|
||||
} catch (e) {
|
||||
console.error('Error calculating optimal stop:', e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user