Added flatbuffers output support to the 'Route' service.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include <vector>
|
||||
|
||||
namespace TurnType = osrm::guidance::TurnType;
|
||||
namespace DirectionModifier = osrm::guidance::DirectionModifier;
|
||||
using TurnInstruction = osrm::guidance::TurnInstruction;
|
||||
|
||||
namespace osrm
|
||||
@@ -34,18 +33,6 @@ namespace json
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Check whether to include a modifier in the result of the API
|
||||
inline bool isValidModifier(const guidance::StepManeuver maneuver)
|
||||
{
|
||||
return (maneuver.waypoint_type == guidance::WaypointType::None ||
|
||||
maneuver.instruction.direction_modifier != DirectionModifier::UTurn);
|
||||
}
|
||||
|
||||
inline bool hasValidLanes(const guidance::IntermediateIntersection &intersection)
|
||||
{
|
||||
return intersection.lanes.lanes_in_turn > 0;
|
||||
}
|
||||
|
||||
inline util::json::Array toJSON(const extractor::TurnLaneType::Mask lane_type)
|
||||
{
|
||||
util::json::Array result;
|
||||
|
||||
@@ -32,8 +32,6 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
|
||||
{
|
||||
BOOST_ASSERT(route_parameters.IsValid());
|
||||
|
||||
auto& json_result = result.get<util::json::Object>();
|
||||
|
||||
if (!algorithms.HasShortestPathSearch() && route_parameters.coordinates.size() > 2)
|
||||
{
|
||||
return Error("NotImplemented",
|
||||
@@ -164,7 +162,7 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
|
||||
}
|
||||
}
|
||||
|
||||
route_api.MakeResponse(routes, start_end_nodes, json_result);
|
||||
route_api.MakeResponse(routes, start_end_nodes, result);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user