Repository navigation
Added Roundabout Instruction - #316
Conversation
|
Thanks! Also for the bunch of tests! I'll try it tomorrow. Some notes:
Also as you have asked to be nit-picky ;)
Only sometimes I use one line and behind e.g. as you did sometimes to describe the if-else clauses. |
|
👍 |
|
thanx for the comments.
So far, more tommorow |
Yeah, in RoutingAlgorithmIT there are some tests failing. Maybe some distance addition or points are missing?
undetermined can only be for tagging problems or strange roundabouts we do not know yet, right? I would prefer
Yeah, I just meant within the one if to avoid casting in the loop (I can also change afterwards and you see what I meant or maybe even leave it as it is)
ups, perfect :) ! |
Are there still some test faiures? For me everything worked fine after fixing a bug when starting in Roundabout. |
|
Ah, missed the commit you did yesterday. Looks fine now. Do you want to add json stuff here (or should I?) and merge later or separate issue? |
|
I would adress your comments right now, including json and then push here. |
|
Nice and yes, if you would do the json stuff it would be even better :) |
removed radian attribute from standard instruction
…raphhopper#316) * initial version * custom model is kept even when switching back and forth between desktop and mobile size * fix bug when mobile view is changed to compact view and no new route is calculated because of an invalid custom model due to missing encoded values (recreation of CustomModelBox without the previously expected /info endpoint being called) * move CustomModelBox into SettingsBox but outside of settingsTable * minor -> warn * minor css fix * make settings css better fit the rest * 1. URL with custom_model should trigger a routing request with it; 2. avoid route re-calculation if settings box is shown; 3. invalid custom model is reset to custom model before if settings box is closed * tricky to fix error 'Cannot use import statement outside a module' in tests: 1. insist on transpiling custom model editor code to avoid ES6 modules for jest and 2. allowJs in tsconfig and 3. explicitly transform js files using ts-jest - why? * remove CustomModel from QueryStore state * formatting * revert change with SettingsContext to use ShowDistanceInMilesContext * format and clean up imports * show error message if invalid custom model (not possible at Settings construction time) * not many benefits to use validateJson as e.g. encoded values not yet known * revert commit 96108d7e07af7811bdf908d32b8fc4f6804c3e89 * remove TODO NOW * Use string to represent custom model state (graphhopper#320) * Move custom model examples to separate file * Minor rename * Extract custom model area function * Remove openSettingsHandle * Rename custom model examples file * Remove warning that can never occur * Move state from settings to query store, query store even depended on settings.. * minor * move custom model box out of settings * oops, made a mistake * Use string to represent custom model state! * much better * add todos * Rename action * no shadow, use text instead * i18n: update * separate custom model box and settings box and use gear as indicator instead of shadow * format --------- Co-authored-by: easbar <[email protected]>
This introduces extra instructions for roundabouts (i.e. enter roundabout and take exit 3). This is achieved by subclassing Instruction as RoundaboutInstruction.
Furthermore every instruction now contains its angle (radian).
Things still to improve:
Code change has no measurable influence on calculation time of instructions (0.3ms of 3ms for Duesseldorfarea )