one more routing error

This commit is contained in:
vcoppe
2024-04-27 11:32:11 +02:00
parent 98b772539d
commit 6cc3918530
2 changed files with 3 additions and 1 deletions

View File

@@ -384,9 +384,10 @@ export class RoutingControls {
try { try {
response = await route(targetCoordinates); response = await route(targetCoordinates);
} catch (e) { } catch (e) {
console.log(e);
if (e.message.includes('from-position not mapped in existing datafile')) { if (e.message.includes('from-position not mapped in existing datafile')) {
toast.error(get(_)("toolbar.routing.error.from")); toast.error(get(_)("toolbar.routing.error.from"));
} else if (e.message.includes('via1-position not mapped in existing datafile')) {
toast.error(get(_)("toolbar.routing.error.via"));
} else if (e.message.includes('to-position not mapped in existing datafile')) { } else if (e.message.includes('to-position not mapped in existing datafile')) {
toast.error(get(_)("toolbar.routing.error.to")); toast.error(get(_)("toolbar.routing.error.to"));
} else { } else {

View File

@@ -80,6 +80,7 @@
}, },
"error": { "error": {
"from": "The start point is too far from the nearest road", "from": "The start point is too far from the nearest road",
"via": "The via point is too far from the nearest road",
"to": "The end point is too far from the nearest road" "to": "The end point is too far from the nearest road"
} }
}, },