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
{{ message }}
Repository navigation
leaving input with tab should work (keyboard navigation) #54
When I type a location in the first input, then "tab" into second, then type a location in the second input and hit return it should show the route. Currently it is required that I select a location from both suggestion lists to update the route.
Also when copy and pasting a location as coordinate it does not route although no geocoding needs to be done.
changed the title [-]leaving input field and return should trigger update[/-][+]leaving input field and pressing enter should trigger update[/+]on Apr 7, 2021
The "keyboard-only" use case I had in mind with this issue still does not work properly: leaving the input via "tab" does not resolve the input via geocoding. (I should have explained this better what I had in mind )
Additionally the focus is not in the "start"-input and does not switch to "destination"-input when pressing "tab" like graphhopper.com/maps currently does. E.g. try: open the URL, type "hamburg", press tab, type "munich", press enter.
So currently graphhopper.com/maps doesn't select anything from the autocomplete when tab is pressed in the search field. Somehow it finds a location anyway. (It even resolves ";klj" to a location :-)) So far we are more restrictive in maps2, meaning we only query a route when a geocoding result is selected.
Do you want to select the first geocoding result when tab is pressed, or something else? The former is easy to do, only the tab order of the app would have to change. The latter would require more work I think.
It is not high prio btw :)
But yes, if no location is selected and tab is pressed I would pick the first location.
currently graphhopper.com/maps doesn't select anything from the autocomplete
Yes, the old version queries even queries nominatim instead of photon if the result is not picked from autocomplete (autocomplete comes from photon). This works quite well in practise (as nominatim is a bit better than photon but has no auto complete feature) but might be too ugly for our new version.
enter start location -> autocomplete suggestions are shown and can be selected with up/down arrows or mouse OR we press tab or click somewhere in which case the suggestions list closes and the user input is left untouched
enter target location -> same thing really
Press Enter -> if autocomplete suggestions were picked, use them. otherwise either send geocoding to nominatim or use the input text directly in case it is a lat,lon pair.
So basically the same as on graphhopper.com/maps :) I think this works quite well?! It's maybe a bit ugly that to use the better geocoder (nominatim) we need this 'workaround' of not selecting from the autocomplete list, but honestly I never even noticed this so far and with this workflow it also feels natural to enter GPS coordinates.
One thing we could improve compared to graphhopper.com/maps: If I type something and then press enter before the autocomplete suggestions appear the cursor will be in the destination input box, but the suggestions for the start location are shown anyway and I cannot see the destination box anymore.
It works when initially "tab" was pressed, but it is broken if I don't use the keyboard initially and paste a coordinate in the input and then press "tab", then the focus goes to the custom model button instead of the next location. Related to #267.
Activity
[-]leaving input field and return should trigger update[/-][+]leaving input field and pressing enter should trigger update[/+][-]leaving input field and pressing enter should trigger update[/-][+]pressing enter should trigger update[/+]karussell commentedon Jun 3, 2021
The "keyboard-only" use case I had in mind with this issue still does not work properly: leaving the input via "tab" does not resolve the input via geocoding. (I should have explained this better what I had in mind )
Additionally the focus is not in the "start"-input and does not switch to "destination"-input when pressing "tab" like graphhopper.com/maps currently does. E.g. try: open the URL, type "hamburg", press tab, type "munich", press enter.
[-]pressing enter should trigger update[/-][+]leaving input with tab should work (keyboard navigation)[/+]Janekdererste commentedon Jun 3, 2021
So currently graphhopper.com/maps doesn't select anything from the autocomplete when tab is pressed in the search field. Somehow it finds a location anyway. (It even resolves ";klj" to a location :-)) So far we are more restrictive in maps2, meaning we only query a route when a geocoding result is selected.
Do you want to select the first geocoding result when tab is pressed, or something else? The former is easy to do, only the tab order of the app would have to change. The latter would require more work I think.
karussell commentedon Jun 3, 2021
It is not high prio btw :)
But yes, if no location is selected and tab is pressed I would pick the first location.
Yes, the old version queries even queries nominatim instead of photon if the result is not picked from autocomplete (autocomplete comes from photon). This works quite well in practise (as nominatim is a bit better than photon but has no auto complete feature) but might be too ugly for our new version.
easbar commentedon Jun 8, 2021
Maybe like this:
So basically the same as on graphhopper.com/maps :) I think this works quite well?! It's maybe a bit ugly that to use the better geocoder (nominatim) we need this 'workaround' of not selecting from the autocomplete list, but honestly I never even noticed this so far and with this workflow it also feels natural to enter GPS coordinates.
One thing we could improve compared to graphhopper.com/maps: If I type something and then press enter before the autocomplete suggestions appear the cursor will be in the destination input box, but the suggestions for the start location are shown anyway and I cannot see the destination box anymore.
karussell commentedon Nov 11, 2022
It works when initially "tab" was pressed, but it is broken if I don't use the keyboard initially and paste a coordinate in the input and then press "tab", then the focus goes to the custom model button instead of the next location. Related to #267.