mirror of
https://github.com/Dasemu/NavFrame.git
synced 2026-11-26 23:26:09 +00:00
fix: automatically road-route GPX stops on import
This commit is contained in:
1 parent
694fefd98b
commit
e6ca89784f
1 file changed
+2
-1
@@ -593,6 +593,7 @@ class TftService : Service() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
val stops = imported.route.geometry
|
val stops = imported.route.geometry
|
||||||
|
invalidateRoutePlan() // Do not allow following the unsnapped straight-line waypoints.
|
||||||
val generation = preparedGeneration
|
val generation = preparedGeneration
|
||||||
val options = RouteOptions(profile = RouteProfile.AVOID_MOTORWAYS, avoidMotorways = true, avoidUnpaved = true)
|
val options = RouteOptions(profile = RouteProfile.AVOID_MOTORWAYS, avoidMotorways = true, avoidUnpaved = true)
|
||||||
mutableRouteInfo.value = "Calculando sobre carreteras · evitando autopistas y pistas sin asfaltar…"
|
mutableRouteInfo.value = "Calculando sobre carreteras · evitando autopistas y pistas sin asfaltar…"
|
||||||
@@ -623,7 +624,7 @@ class TftService : Service() {
|
|||||||
throw cancelled
|
throw cancelled
|
||||||
} catch (error: Exception) {
|
} catch (error: Exception) {
|
||||||
if (generation == preparedGeneration)
|
if (generation == preparedGeneration)
|
||||||
mutableRouteInfo.value = "No se pudo calcular sobre carreteras. Se conserva el GPX original; comprueba conexión y endpoint Valhalla."
|
mutableRouteInfo.value = "No se pudo calcular por carreteras. No se puede iniciar esta ruta; comprueba Internet y Valhalla y vuelve a importarla."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user