fix-378: Add proper maneuver icons#379
fix-378: Add proper maneuver icons#379nandalalshukla wants to merge 1 commit intovalhalla:masterfrom
Conversation
nilsnolde
left a comment
There was a problem hiding this comment.
hm I don't know, this seems very hacky all in all. we should not ever rely on text matching to derive anything for maneuvery. there's maneuver types and they're all we should need in the valhalla format. but as I mentioned in #378 we probably want to look at the osrm output format for guidance instructions.
|
I tried to show icons based on the types, but i found some inconsistencies when showing icons based on types. |
|
let me ask a question before I continue: how did you research for the PR? I mean what sources of info did you use, e.g. for valhalla's |
🛠️ Fixes Issue
Closes #378
👨💻 Changes proposed
Created a function in the get-direction-icon.ts file that return the appropriate icons for a given manuever, handling different edgecases.
Also added the tests for it - all tests passes!
📄 Note to reviewers
Please review the changes in these files,
get-direction-icon.ts
get-direction-icon.spec.ts
maneuvers.tsx
and suggest any improvements if required, i tried my best to match the practices followed in the codebase.
📷 Screenshots
You can see now it show different icons based on the maneuvers :)
