Don't pass down unsnapped coordinates. All information is already there
This commit is contained in:
@@ -243,18 +243,13 @@ Status TripPlugin::HandleRequest(const api::TripParameters ¶meters,
|
||||
// compute all round trip routes
|
||||
std::vector<InternalRouteResult> routes;
|
||||
routes.reserve(trips.size());
|
||||
std::vector<std::vector<util::Coordinate>> ordered_coordinates;
|
||||
ordered_coordinates.reserve(trips.size());
|
||||
for (const auto &trip : trips)
|
||||
{
|
||||
routes.push_back(ComputeRoute(snapped_phantoms, parameters, trip));
|
||||
ordered_coordinates.push_back(std::vector<util::Coordinate>());
|
||||
for (const auto nid : trip)
|
||||
ordered_coordinates.back().push_back(parameters.coordinates[nid]);
|
||||
}
|
||||
|
||||
api::TripAPI trip_api{BasePlugin::facade, parameters};
|
||||
trip_api.MakeResponse(trips, routes, snapped_phantoms, json_result, ordered_coordinates);
|
||||
trip_api.MakeResponse(trips, routes, snapped_phantoms, json_result);
|
||||
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ Status ViaRoutePlugin::HandleRequest(const api::RouteParameters &route_parameter
|
||||
if (raw_route.is_valid())
|
||||
{
|
||||
api::RouteAPI route_api{BasePlugin::facade, route_parameters};
|
||||
route_api.MakeResponse(raw_route, json_result, &route_parameters.coordinates);
|
||||
route_api.MakeResponse(raw_route, json_result);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user