Fix annotations=true handling in NodeJS bindings & libosrm (#6415)

This commit is contained in:
Siarhei Fedartsou
2022-10-19 08:35:18 +02:00
committed by GitHub
parent d65e8c7d1e
commit fb1bb7a15b
5 changed files with 20 additions and 7 deletions
+2 -2
View File
@@ -439,7 +439,7 @@ class RouteAPI : public BaseAPI
{
// AnnotationsType uses bit flags, & operator checks if a property is set
flatbuffers::Offset<flatbuffers::Vector<float>> speed;
if (parameters.annotations_type & RouteParameters::AnnotationsType::Speed)
if (requested_annotations & RouteParameters::AnnotationsType::Speed)
{
double prev_speed = 0;
speed =
@@ -778,7 +778,7 @@ class RouteAPI : public BaseAPI
util::json::Object annotation;
// AnnotationsType uses bit flags, & operator checks if a property is set
if (parameters.annotations_type & RouteParameters::AnnotationsType::Speed)
if (requested_annotations & RouteParameters::AnnotationsType::Speed)
{
double prev_speed = 0;
annotation.values["speed"] = GetAnnotations(