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:
2026-03-10 17:10:01 -05:00
parent 7536dbe2e3
commit 1b0f309f6a
4 changed files with 14 additions and 6 deletions

View File

@ -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);
}