After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737322 - Allow routing directions between multiple arbitrary points
Allow routing directions between multiple arbitrary points
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
3.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-25 02:39 UTC by Jean-François Fortin Tam
Modified: 2016-01-30 14:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Temporary patch for selecting from here point and to here point on right click (2.07 KB, patch)
2014-10-16 17:36 UTC, amisha
none Details | Review
contextMenu: Allow routing from right click (3.80 KB, patch)
2015-09-07 20:43 UTC, Jonas Danielsson
none Details | Review
contextMenu: Allow routing from right click (3.68 KB, patch)
2015-09-07 20:50 UTC, Jonas Danielsson
none Details | Review
contextMenu: Allow routing from right click (3.71 KB, patch)
2015-09-07 20:56 UTC, Jonas Danielsson
none Details | Review
contextMenu: Allow routing from right click (3.73 KB, patch)
2016-01-30 14:07 UTC, Jonas Danielsson
committed Details | Review

Description Jean-François Fortin Tam 2014-09-25 02:39:17 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
Comment 1 Jonas Danielsson 2014-09-25 05:43:55 UTC
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.
Comment 2 Damián Nohales 2014-09-25 20:00:23 UTC
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.
Comment 3 amisha 2014-10-16 17:36:19 UTC
Created attachment 288704 [details] [review]
Temporary patch for selecting from here point and to here point on right click
Comment 4 Andreas Nilsson 2014-10-17 10:15:46 UTC
Sounds good.
Comment 5 Jonas Danielsson 2015-09-07 10:30:29 UTC
Is this still something we want? Routing from the context-menu. When do one really use it?
Comment 6 Jonas Danielsson 2015-09-07 10:31:15 UTC
It shoulde be somewhat easy to implement, following Damians algorithm above. So suitable for newcomers.
Comment 7 Jean-François Fortin Tam 2015-09-07 15:05:32 UTC
> 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)
Comment 8 Jonas Danielsson 2015-09-07 20:43:20 UTC
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.
Comment 9 Jonas Danielsson 2015-09-07 20:47:11 UTC
cast: https://www.youtube.com/watch?v=h_HrcMRAtxw&feature=youtu.be

Thoughts? Freeze break worthy?
Comment 10 Jonas Danielsson 2015-09-07 20:50:50 UTC
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.
Comment 11 Jonas Danielsson 2015-09-07 20:56:05 UTC
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.
Comment 12 Damián Nohales 2015-09-30 13:31:17 UTC
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.
Comment 13 Jonas Danielsson 2015-10-05 09:04:57 UTC
(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.
Comment 14 Jonas Danielsson 2015-10-05 09:08:49 UTC
(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.
Comment 15 Jonas Danielsson 2016-01-30 11:25:14 UTC
Andreas, any thoiughts?
Comment 16 Jonas Danielsson 2016-01-30 14:07:21 UTC
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.
Comment 17 Jonas Danielsson 2016-01-30 14:10:15 UTC
Attachment 320075 [details] pushed as 3d6efe1 - contextMenu: Allow routing from right click