fix(directions): drawResult no longer clears the result state, so turn-by-turn/distance remain visible after calculating
All checks were successful
CI / test-and-build (push) Successful in 41s
All checks were successful
CI / test-and-build (push) Successful in 41s
This commit is contained in:
parent
000b892202
commit
2ce71b8955
@ -157,15 +157,18 @@
|
||||
}
|
||||
|
||||
// --- clear / route drawing ---
|
||||
function clearRoute() {
|
||||
function clearMap() {
|
||||
if (routeLayer) { routeLayer.remove(); routeLayer = null; }
|
||||
}
|
||||
function clearRoute() {
|
||||
clearMap();
|
||||
result = null;
|
||||
status = 'idle';
|
||||
errorMsg = null;
|
||||
}
|
||||
async function drawResult(r: RouteResult) {
|
||||
const L = (await import('leaflet')).default;
|
||||
clearRoute();
|
||||
clearMap();
|
||||
if (!map) return;
|
||||
routeLayer = L.layerGroup().addTo(map);
|
||||
const drawPath = r.path ?? [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user