Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distance property documented but missing from waypoints #5247

Closed
danpat opened this issue Oct 26, 2018 · 1 comment
Closed

distance property documented but missing from waypoints #5247

danpat opened this issue Oct 26, 2018 · 1 comment

Comments

@danpat
Copy link
Member

danpat commented Oct 26, 2018

Our docs mention in several places that waypoint objects in responses to pretty much all APIs should contain a distance property.

However, only the nearest plugin actually does this - other APIs (table, route, etc) don't include a distance property for waypoints.

In many of our sample snippets in the docs, the distance property is shown for waypoint objects, even though we don't actually emit one.

We should just be consistent here and return it always. The nearest plugin here:

https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/api/nearest_api.hpp#L43-L44

shows how the property can be added - although this could be moved to the BaseAPI and just done for all cases.

Once it's consistently available, we should also update the docs.

@danpaz
Copy link
Contributor

danpaz commented Dec 20, 2018

Released in 5.21.0

@danpaz danpaz closed this as completed Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants