You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I would also say probably copy&paste for now and once we delete the current GH maps we can maybe also dissolve the module into the new GH maps. It already uses the same toolchain (webpack/jest/typescript) (even though I did not use any typings).
We could add a gear wheel icon near the plus icon and create some kind of a "power mode" panel including options to add certain path details or buttons to "avoid xy" or disable alternative routes or switch between miles and km and stuff like this?
And there we could put the custom editor either directly or add another icon that opens it.
Another idea could be to let the custom add certain snippets to the custom model: e.g. a dropdown with "exclude ferry", "exclude motorway", "slower speed", "exclude area", "shortest path" etc and make the syntax more accessible without documentation.
@Janekdererste if you can come up with anything that hides/shows the editor using some kind of gear wheel icon or similar (as @karussell described above) that would be great.
The other thing I am not sure about is whether or not we need a 'calculate route' button. When users start typing a custom model it will be syntax-checked by the editor. But we don't want to send a request as soon as they typed something valid. When the model is finished we don't want to require users to delete and put back one of the query locations or something to trigger the request either. There will also be a keyboard shortcut like Ctrl+Enter to send the request regardless of the syntax checking, but this is more like a bonus feature and it should be possible to use custom models without keyboard shortcuts.
Another idea could be to let the custom add certain snippets to the custom model: e.g. a dropdown with "exclude ferry", "exclude motorway", "slower speed", "exclude area", "shortest path" etc and make the syntax more accessible without documentation.
Yes, this could be useful, but right now I would try to just implement the same features we have in the old maps app? But maybe it's good to keep this in mind, because if we want to add things like this we probably need more space than we have in the sidebar currently.
@Janekdererste if you can come up with anything that hides/shows the editor using some kind of gear wheel icon or similar (as @karussell described above) that would be great.
Yes, I will have time for this later this week. I'll push it on the custom_model_box branch
Activity
karussell commentedon Mar 15, 2021
The custom model editor is a separate project in current GH maps and could be easily copied:
https://github.com/graphhopper/graphhopper/tree/master/web-bundle/src/main/js/custom-model-editor
easbar commentedon Mar 15, 2021
Yes, I would also say probably copy&paste for now and once we delete the current GH maps we can maybe also dissolve the module into the new GH maps. It already uses the same toolchain (webpack/jest/typescript) (even though I did not use any typings).
[-]flex box[/-][+]custom model box[/+]easbar commentedon Jun 8, 2021
The component is now here: https://github.com/graphhopper/custom-model-editor
The biggest question will probably be where we should put the editor :)
karussell commentedon Jun 8, 2021
We could add a gear wheel icon near the plus icon and create some kind of a "power mode" panel including options to add certain path details or buttons to "avoid xy" or disable alternative routes or switch between miles and km and stuff like this?
And there we could put the custom editor either directly or add another icon that opens it.
easbar commentedon Jun 14, 2021
Taken from @karussell from another discussion:
easbar commentedon Feb 7, 2022
I started working on this and simply put the custom model editor into the sidebar to get started: https://github.com/graphhopper/graphhopper-maps/tree/custom_model_box
@Janekdererste if you can come up with anything that hides/shows the editor using some kind of gear wheel icon or similar (as @karussell described above) that would be great.
The other thing I am not sure about is whether or not we need a 'calculate route' button. When users start typing a custom model it will be syntax-checked by the editor. But we don't want to send a request as soon as they typed something valid. When the model is finished we don't want to require users to delete and put back one of the query locations or something to trigger the request either. There will also be a keyboard shortcut like Ctrl+Enter to send the request regardless of the syntax checking, but this is more like a bonus feature and it should be possible to use custom models without keyboard shortcuts.
Yes, this could be useful, but right now I would try to just implement the same features we have in the old maps app? But maybe it's good to keep this in mind, because if we want to add things like this we probably need more space than we have in the sidebar currently.
Janekdererste commentedon Feb 14, 2022
Yes, I will have time for this later this week. I'll push it on the custom_model_box branch
easbar commentedon Feb 14, 2022
I also kept working on this because I needed the 'enabled' state of the box to continue. I'll push what I did so far.