GNOME Bugzilla – Bug 737322
Allow routing directions between multiple arbitrary points
Last modified: 2016-01-30 14:10:19 UTC
I'd like to be able to right-click anywhere on the map and say "route to here" (and possible click another point and say "route from here"). And then click anywhere else and add more points to the itinerary, which could then be reordered later in bug #737321
Thanks! Ok, so lets see. A "route from here" would set the clicked location in the first entry? (from field). Should a subsequent "route from here" replace that one? Or push the one currently there "down" one? A "route to here" would set the clicked location in the first empty entry after the from field? Possible adding new if there are no empty? Also, should the location you click be represented as lat, lon? Since that is all the information we have after a click. Or should it perform a reverse-geocode? That would mean it would be unlikely it would be exactly the place that you clicked.
What Google Maps does is: ----- hide "Route from here", "Route to here" and "Add a destination" if (From and To entry are populated) show "Add a destination" menu item else if (From entry is not populated) show "Route from here" menu item if (To entry is not populated) show "Route to here" menu item ----- We can use some similar algorithm with the difference that we need to always show "Route from here" and "Route to here" menu items when sidebar isn't visible, and when user press one of this buttons, clear the current route query. Also, one thing Google Maps does is to represent the location as coordinates in the text entry and instantly do the route lookup, while do some reverse geocode to refresh the text entry.
Created attachment 288704 [details] [review] Temporary patch for selecting from here point and to here point on right click
Sounds good.
Is this still something we want? Routing from the context-menu. When do one really use it?
It shoulde be somewhat easy to implement, following Damians algorithm above. So suitable for newcomers.
> Is this still something we want? Routing from the context-menu. > When do one really use it? I use it all the time! It allows: - Going by rough location (ie: street corner/borough/etc.) instead of needing to be accurate, when you just want to estimate something with a ballpark figure. I usually know where I want to go and I'm used to reading maps, I just don't necessarily know the time it'll take me to get there and the various ways I can go there. - NOT having to dig up the exact address of $FRIEND/$SCHOOL/$whatever everytime - Testing routing corner cases - Working around broken searches (search results are not very reliable, and even Google isn't perfect)
Created attachment 310861 [details] [review] contextMenu: Allow routing from right click Add item to context menu to allow routing to/from/via the right clicked location.
cast: https://www.youtube.com/watch?v=h_HrcMRAtxw&feature=youtu.be Thoughts? Freeze break worthy?
Created attachment 310862 [details] [review] contextMenu: Allow routing from right click Add item to context menu to allow routing to/from/via the right clicked location.
Created attachment 310863 [details] [review] contextMenu: Allow routing from right click Add item to context menu to allow routing to/from/via the right clicked location.
Review of attachment 310863 [details] [review]: Some thoughts: - We don't have the possibility to select the destination (To) when nothing is populated. I mean, we should show both "Route from here" and "Route to here" initially. If for example I'm looking for a POI, I would like to set it as my destination afterwards. - What if the sidebar is not visible? we should take that into account. Right now we are checking the global query information, but we can have a populated query there but also a hidden sidebar. So, if the sidebar is hidden, no matter what's in the global query we should always show "Route from here" and "Route to here" in the menu.
(In reply to Damián Nohales from comment #12) > Review of attachment 310863 [details] [review] [review]: > Thanks Damian! > Some thoughts: > > - We don't have the possibility to select the destination (To) when nothing > is populated. I mean, we should show both "Route from here" and "Route to > here" initially. If for example I'm looking for a POI, I would like to set > it as my destination afterwards. I am not sure about this. We have the same behavior when we press the route button on a Map bubble, right? I feel that if you select the route thingie, you will get the sidebar. And from there it is a simple Drag-n-drop operation to change from/to. It will be pretty cluttered if we include the choice to route to/from in every place. > - What if the sidebar is not visible? we should take that into account. > Right now we are checking the global query information, but we can have a > populated query there but also a hidden sidebar. So, if the sidebar is > hidden, no matter what's in the global query we should always show "Route > from here" and "Route to here" in the menu. Should we? I am not sure. Right now we keep a route even tho the sidebar is hidden. So if you re-show it you get the route that was left there. So why shouldn't a click to add destination add destination to that route? It feels a bit in-consistent to clear it. So I feel either we always clear the route on sidebar hide or we never. But I can be convinced that I am utterly wrong.
(In reply to Jonas Danielsson from comment #13) > (In reply to Damián Nohales from comment #12) > > Review of attachment 310863 [details] [review] [review] [review]: > > > > Thanks Damian! > > > Some thoughts: > > > > - We don't have the possibility to select the destination (To) when nothing > > is populated. I mean, we should show both "Route from here" and "Route to > > here" initially. If for example I'm looking for a POI, I would like to set > > it as my destination afterwards. > > I am not sure about this. We have the same behavior when we press the route > button on a Map bubble, right? > > I feel that if you select the route thingie, you will get the sidebar. And > from there it is a simple Drag-n-drop operation to change from/to. It will > be pretty cluttered if we include the choice to route to/from in every place. > So What I am saying is that, I feel it is better to have a button that brings you to the sidebar UI, where you can quickly correct stuff like which should be to or from, than duplicating a choice between to and from everywhere.
Andreas, any thoiughts?
Created attachment 320075 [details] [review] contextMenu: Allow routing from right click Add item to context menu to allow routing to/from/via the right clicked location.
Attachment 320075 [details] pushed as 3d6efe1 - contextMenu: Allow routing from right click