Fix annotations=true handling in NodeJS bindings & libosrm (#6415)
This commit is contained in:
committed by
GitHub
parent
d65e8c7d1e
commit
fb1bb7a15b
@@ -799,6 +799,9 @@ inline bool parseCommonParameters(const v8::Local<v8::Object> &obj, ParamType &p
|
||||
if (annotations->IsBoolean())
|
||||
{
|
||||
params->annotations = Nan::To<bool>(annotations).FromJust();
|
||||
params->annotations_type = params->annotations
|
||||
? osrm::RouteParameters::AnnotationsType::All
|
||||
: osrm::RouteParameters::AnnotationsType::None;
|
||||
}
|
||||
else if (annotations->IsArray())
|
||||
{
|
||||
@@ -845,6 +848,9 @@ inline bool parseCommonParameters(const v8::Local<v8::Object> &obj, ParamType &p
|
||||
Nan::ThrowError("this 'annotations' param is not supported");
|
||||
return false;
|
||||
}
|
||||
|
||||
params->annotations =
|
||||
params->annotations_type != osrm::RouteParameters::AnnotationsType::None;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user