added ability to show UserOutput variables in brouter-web#893
Conversation
|
@kameamea |
|
@kameamea |
|
I did my first test with results:
|
|
The announced conflict with |
|
The values are multiplied by 1000 like the costfactor since I assumed this to be the main purpose, so this was expected (by me). And I assume that only integer values are transported to brouter-web, but I'm not sure about that. I cannot reproduce the problem with car profiles. However so far user variables do not work in the context:node section (as I needed it only for ways). But it looks like you hit some other issue since you see the variable in the headline |
The problem was in car profile (way section, node section I haven't tested). Just copy my userOutput to a car profile.
Please follow your naming But there is an other main issue, I think. An additional idea: This keeps you open for more like |
As before follow your naming. |
|
Thanks for the hints:
Your suggestion of putting the userOutput after the last column typically requires scrolling horizontally a lot to see it at all and thus makes the feature hardly usable. I've thought about using two different keywords like userOutputFront (which breaks analysis) and userOutputBack (after last column), but I'm not sure whether this is a good idea. In the end it's meant to help debugging profiles and can easily be turned off by the profile developer when track analysis becomes important. Of course this behaviour should be documented. What do you think would be best?
|
|
to 1.:
In my opinion, this is extremely useful, if I only had an integer number in this output, it would be useless. We are talking about debugging, that needs exact values and not a beautiful view. to 2.:
There are other clients outside that may use the json output. to 3.: to 4.: |
@afischerdev That's right. 👍 It's absolutely important with public API to maintain compatibility |

When developing/debugging profiles I found it helpful to watch arbitrary variables in the brouter-web data table not just node$, elevation$, initial$, turn$
I implemented the ability to create variables starting with the name "userOutput" which then are shown in brouter-web (and in the json output as well). No modification to brouter-web is necessary.