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

feat: allow calculateRoute and matchRoute to return rawResult #508

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

farfromrefug
Copy link
Contributor

This PR makes 2 changes:

  • add rawResult to RoutingResult and RouteMatchingResult. This allows to send any custom options to Valhalla and read the result as json string so that you can do anything with it without having to modify RoutingResult and RouteMatchingResult. It is also very useful for cross plaftorm frameworks like React Native or Nativescript. The reason is that to pass the result to JS you only need to marshall a string and not a full structure of std vector and tons of data.
  • allow RouteMatchingResult to have to matched_points. Using custom parameters you can query only edge data. Without this PR it would throw because there is no matched_points (which you actually did not ask for).

also allow Valhalla matchRoute to not return `matched_points` (when only edges are requested)
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

Successfully merging this pull request may close these issues.

1 participant