auto-sync: 2026-05-04 12:30:01
This commit is contained in:
@@ -20,3 +20,4 @@
|
||||
{"ts":"2026-05-03T18:17:28Z","session":"20260503-051453_mva154_nginx-enduro-location_3cee","host":"mva154","status":"success","agent":"stream","files":["/etc/nginx/sites-enabled/openclaw.mva154.duckdns.org"]}
|
||||
{"ts":"2026-05-04T08:32:10Z","action":"cleanup","deleted_orphaned_sessions":0,"deleted_logs":0,"retention_days":30}
|
||||
{"ts":"2026-05-04T08:37:04Z","session":"20260504-083250_mva154_enduro-phase3-bugfix_d0a2","host":"mva154","status":"success","agent":"dev","files":["/home/slin/enduro-trails/prototype/app.py","/home/slin/enduro-trails/prototype/static/app.js"]}
|
||||
{"ts":"2026-05-04T09:24:59Z","action":"cleanup","deleted_orphaned_sessions":0,"deleted_logs":0,"retention_days":30}
|
||||
|
||||
@@ -485,9 +485,13 @@ async def post_route(req: RouteRequest):
|
||||
coords_str = ";".join(f"{wp.lon},{wp.lat}" for wp in req.waypoints)
|
||||
alternatives = max(1, min(5, req.alternatives))
|
||||
|
||||
# Увеличенный snap radius для длинных маршрутов (5 км)
|
||||
radiuses_str = ";".join(["5000"] * len(req.waypoints))
|
||||
|
||||
url = (
|
||||
f"{OSRM_URL}/route/v1/driving/{coords_str}"
|
||||
f"?alternatives={alternatives}&overview=full&geometries=geojson&annotations=false"
|
||||
f"&radiuses={radiuses_str}"
|
||||
)
|
||||
|
||||
try:
|
||||
@@ -525,7 +529,16 @@ async def post_route(req: RouteRequest):
|
||||
raise HTTPException(503, f"OSRM недоступен: {e}")
|
||||
|
||||
if data.get("code") != "Ok" or not data.get("routes"):
|
||||
raise HTTPException(404, "Маршрут не найден")
|
||||
osrm_code = data.get("code", "Unknown")
|
||||
osrm_msg = data.get("message", "")
|
||||
if osrm_code == "NoRoute":
|
||||
raise HTTPException(404, "Маршрут не найден: нет пути между точками")
|
||||
elif osrm_code == "NoSegment":
|
||||
raise HTTPException(404, "Маршрут не найден: точки слишком далеко от дорог")
|
||||
elif osrm_code == "InvalidValue":
|
||||
raise HTTPException(400, f"Некорректные координаты: {osrm_msg}")
|
||||
else:
|
||||
raise HTTPException(404, f"Маршрут не найден ({osrm_code})")
|
||||
|
||||
# Открываем БД один раз для всех маршрутов
|
||||
try:
|
||||
|
||||
@@ -226,6 +226,21 @@ body {
|
||||
bottom: 40px;
|
||||
}
|
||||
|
||||
/* ─── Панель маршрута — не перекрывать кнопки управления ─────────────────── */
|
||||
#route-panel {
|
||||
right: 56px !important; /* кнопки 36px + gap 10px + отступ 10px */
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
#route-panel {
|
||||
right: 8px !important;
|
||||
left: 8px !important;
|
||||
width: auto !important;
|
||||
bottom: 100px !important; /* выше кнопок на мобиле */
|
||||
max-height: 50vh;
|
||||
}
|
||||
}
|
||||
|
||||
.map-ctrl-btn {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<div id="stats">Zoom: <span id="zoom-val">7</span> | Координаты: <span id="coords-val">—</span></div>
|
||||
|
||||
<!-- ─── Панель маршрута (Фаза 3) ─────────────────────────────────────── -->
|
||||
<div id="route-panel" style="display:none; position:absolute; bottom:40px; right:10px;
|
||||
<div id="route-panel" style="display:none; position:absolute; bottom:40px;
|
||||
background:rgba(255,255,255,0.97); border:1px solid #ddd; border-radius:8px;
|
||||
padding:12px; font-size:13px; z-index:5; width:280px;
|
||||
box-shadow:0 2px 12px rgba(0,0,0,0.15); max-height:70vh; overflow-y:auto;">
|
||||
|
||||
Reference in New Issue
Block a user