set RouteParameters annotations member, when constructor only specifies annotations_type, add unit_tests

This commit is contained in:
karenzshea
2017-01-30 15:13:03 +01:00
committed by Patrick Niklaus
parent f1427a834d
commit 3106b5dd9e
2 changed files with 39 additions and 2 deletions
@@ -44,7 +44,9 @@ struct RouteParametersGrammar : public BaseParametersGrammar<Iterator, Signature
{
const auto add_annotation = [](engine::api::RouteParameters &route_parameters,
engine::api::RouteParameters::AnnotationsType &route_param) {
return route_parameters.annotations_type = route_parameters.annotations_type | route_param;
route_parameters.annotations_type = route_parameters.annotations_type | route_param;
route_parameters.annotations = route_parameters.annotations_type != engine::api::RouteParameters::AnnotationsType::None;
return route_parameters;
};
geometries_type.add("geojson", engine::api::RouteParameters::GeometriesType::GeoJSON)(