diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index 37545f0069..fec673ac16 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -147,7 +147,7 @@ void MapWindow::timerUpdate() { loaded_once = loaded_once || m_map->isFullyLoaded(); if (!loaded_once) { - map_instructions->showError("Map loading"); + map_instructions->showError("Map Loading"); return; } @@ -343,6 +343,7 @@ void MapWindow::calculateRoute(QMapbox::Coordinate destination) { } void MapWindow::routeCalculated(QGeoRouteReply *reply) { + bool got_route = false; if (reply->error() == QGeoRouteReply::NoError) { if (reply->routes().size() != 0) { qWarning() << "Got route response"; @@ -357,6 +358,7 @@ void MapWindow::routeCalculated(QGeoRouteReply *reply) { navSource["data"] = QVariant::fromValue(feature); m_map->updateSource("navSource", navSource); m_map->setLayoutProperty("navLayer", "visibility", "visible"); + got_route = true; updateETA(); } else { @@ -366,6 +368,10 @@ void MapWindow::routeCalculated(QGeoRouteReply *reply) { qWarning() << "Got error in route reply" << reply->errorString(); } + if (!got_route) { + map_instructions->showError("Failed to Route"); + } + reply->deleteLater(); }