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

Support arbitrary router-specific parameters on waypoints #269

Open
ianthetechie opened this issue Sep 25, 2024 · 0 comments
Open

Support arbitrary router-specific parameters on waypoints #269

ianthetechie opened this issue Sep 25, 2024 · 0 comments
Labels
android core Related to the Rust core enhancement New feature or request iOS web

Comments

@ianthetechie
Copy link
Contributor

Some routers (like Valhalla) have a almost extreme-level of flexibility when it comes to waypoint specification. Our model is currently simplistic. However, with an optional "dictionary", we could support arbitrarily extensible waypoint properties.

This would of course be left entirely to the RouteRequestGenerator to actually handle, but in the Valhalla case, it's pretty much identical to what we do in #268; just convert it to JSON and update the location object.

This raises a few other questions for discussion:

  1. Should we change our approach to WaypointKind? Maybe that could allow arbitrary values too. I assume the two variants we support have equivalents on all routing engines, but anyone please feel free to fact check me on this!
  2. In the case of Support arbitrary Valhalla options (formerly we only merged costing opts) #268, we are talking about something Valhalla-specific, so we know it's a JSON object and can model it accordingly. What should we do here? Key/value pairs with a HashMap<String, ??> seems logical, but is that too JSON-specific? Should we just leave this as an Option<Vec<u8>> and leave it up to the request generator to know what to do with it? I lean toward the latter, but discussion welcome on this.
@ianthetechie ianthetechie added enhancement New feature or request android iOS core Related to the Rust core web labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android core Related to the Rust core enhancement New feature or request iOS web
Projects
None yet
Development

No branches or pull requests

1 participant