MCPcopy Create free account
hub / github.com/comaps/comaps / SaveRoute

Method SaveRoute

libs/map/routing_manager.cpp:1210–1224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208}
1209
1210kml::TrackId RoutingManager::SaveRoute()
1211{
1212 std::vector<geometry::PointWithAltitude> junctions;
1213 if (!RoutingSession().GetRouteJunctionPoints(junctions))
1214 return kml::kInvalidTrackId;
1215
1216 base::Unique(junctions, [](geometry::PointWithAltitude const & p1, geometry::PointWithAltitude const & p2)
1217 { return AlmostEqualAbs(p1, p2, kMwmPointAccuracy); });
1218
1219 auto const routePoints = GetRoutePoints();
1220 std::string const from = GetNameFromPoint(routePoints.front());
1221 std::string const to = GetNameFromPoint(routePoints.back());
1222
1223 return m_bmManager->SaveRoute(std::move(junctions), from, to);
1224}
1225
1226bool RoutingManager::DisableFollowMode()
1227{

Callers

nothing calls this directly

Calls 7

RoutingSessionClass · 0.85
UniqueFunction · 0.85
GetNameFromPointFunction · 0.85
frontMethod · 0.80
backMethod · 0.80
AlmostEqualAbsFunction · 0.50

Tested by

no test coverage detected