Adds generate_hints=true for dropping hints in response, resolves #1789.
Adds an `generate_hints=false` option which lets us skip generating and emitting hints for Waypoints. This can be used to decrease the response size when the user does not need hints anyway. We should think about making `false` the default here in v6.
This commit is contained in:
@@ -288,11 +288,17 @@ util::json::Object makeRoute(const guidance::Route &route,
|
||||
return json_route;
|
||||
}
|
||||
|
||||
util::json::Object makeWaypoint(const util::Coordinate location, std::string name, const Hint &hint)
|
||||
util::json::Object makeWaypoint(const util::Coordinate location, std::string name)
|
||||
{
|
||||
util::json::Object waypoint;
|
||||
waypoint.values["location"] = detail::coordinateToLonLat(location);
|
||||
waypoint.values["name"] = std::move(name);
|
||||
return waypoint;
|
||||
}
|
||||
|
||||
util::json::Object makeWaypoint(const util::Coordinate location, std::string name, const Hint &hint)
|
||||
{
|
||||
auto waypoint = makeWaypoint(location, name);
|
||||
waypoint.values["hint"] = hint.ToBase64();
|
||||
return waypoint;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user