Added new base parameter 'skip_waypoints'
This commit is contained in:
parent
81071b5af9
commit
10c1b38139
@ -87,6 +87,9 @@ struct BaseParameters
|
||||
// Adds hints to response which can be included in subsequent requests, see `hints` above.
|
||||
bool generate_hints = true;
|
||||
|
||||
// Remove waypoints array from the response.
|
||||
bool skip_waypoints = false;
|
||||
|
||||
SnappingType snapping = SnappingType::Default;
|
||||
|
||||
BaseParameters(const std::vector<util::Coordinate> coordinates_ = {},
|
||||
|
@ -152,6 +152,10 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar<Iterator, Signature>
|
||||
qi::lit("generate_hints=") >
|
||||
qi::bool_[ph::bind(&engine::api::BaseParameters::generate_hints, qi::_r1) = qi::_1];
|
||||
|
||||
skip_waypoints_rule =
|
||||
qi::lit("skip_waypoints=") >
|
||||
qi::bool_[ph::bind(&engine::api::BaseParameters::skip_waypoints, qi::_r1) = qi::_1];
|
||||
|
||||
bearings_rule =
|
||||
qi::lit("bearings=") >
|
||||
(-(qi::short_ > ',' > qi::short_))[ph::bind(add_bearing, qi::_r1, qi::_1)] % ';';
|
||||
@ -183,6 +187,7 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar<Iterator, Signature>
|
||||
| hints_rule(qi::_r1) //
|
||||
| bearings_rule(qi::_r1) //
|
||||
| generate_hints_rule(qi::_r1) //
|
||||
| skip_waypoints_rule(qi::_r1) //
|
||||
| approach_rule(qi::_r1) //
|
||||
| exclude_rule(qi::_r1) //
|
||||
| snapping_rule(qi::_r1);
|
||||
@ -203,6 +208,7 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar<Iterator, Signature>
|
||||
qi::rule<Iterator, Signature> hints_rule;
|
||||
|
||||
qi::rule<Iterator, Signature> generate_hints_rule;
|
||||
qi::rule<Iterator, Signature> skip_waypoints_rule;
|
||||
qi::rule<Iterator, Signature> approach_rule;
|
||||
qi::rule<Iterator, Signature> exclude_rule;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user