stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
184 stars 24 forks source link

Support for visual sub-maneuvers #303

Closed ahmedre closed 1 month ago

ahmedre commented 1 month ago

Within BannerInstructions, the MapBox API allows for a sub_content for describing sub-maneuvers. This data is used either for showing the step after the current one if it is to happen really quickly after the current step (ex turn left then turn right), or to specify lane information. This PR implements this within Ferrostar.

ahmedre commented 1 month ago

relevant urls:

I set this as a draft because I am not sure if this approach is correct, especially considering Valhalla responses (which I didn't think about too much), and about different types of subs, and about the overall model structuring. I figured it was easier to discuss over a PR than just text, so happy to make changes accordingly.

Also, I guess I am breaking backward compatibility, but am not sure about what the recommended way to fix this is.

ianthetechie commented 1 month ago

Looks like a few failures CI caught which are easy to fix (missing params etc.)

ahmedre commented 1 month ago

had to merge with main to do the fixes but should hopefully be good now

ahmedre commented 1 month ago

for the UI, happy to try this in another PR - we're still wrapping a ManeuverView from maplibre-navigation so would be a good opportunity for us to not depend on it anymore 👍