navit-gps / navit

The open source (GPL v2) turn-by-turn navigation software for many OS
http://www.navit-project.org
Other
552 stars 175 forks source link

Add new route drawing style(s) #885

Open lains opened 5 years ago

lains commented 5 years ago

I wonder if there could be new ways of displaying the current route, that would make it appear clearer (more robust to other elements displayed on map) while navigating. I'm thinking about very dense urban cities where there are so many streets that the current route to follow (being drawn behind the streets) would be hard to guess.

Google drive has one way of displaying the current route that stands out of any of the map items: image

While I'm not sure this is the best way to go (because it would hide road names), it is quite visually efficient.

On (old) screenshots, it seems the route was drawn in the foreground, for example here: http://wiki.navit-project.org/index.php/File:Netbook_Layout_2_routing.png

Other ideas are welcome...

metalstrolch commented 5 years ago

If the route is drawn above or below the other elements can be controlled in the navit layout xml file. Search for the "street_route" entries. The more down in the list of elements they are the more on top of the elements they are drawn. Looking at the "car" layout (navit_layout_car.xml) you can see that the route is among the lowest elements drawn.

So currently we could: Draw the route on top, and make it e.g. transparent. on higher zoom levels. Unfortunately not all graphucs back ends support transparency. SDL for example doesn't. While Qt5 and Gtk do. Still no clue for Android.

We cannot draw dots, as we don't have a corresponding itemgra. Unfortunately using the "dash" parameter on polyline does only work if the width equals 1. This is because wider polylines are drawn as polygons in reality to get the "round" ends and to allow the 3d view. The Arrows I added to #884 are limited to one way at the moment. But of course we could do something similar with dots. But it will never look as smooth as the example picture.

Btw: Does google allow to steal from their designs?

metalstrolch commented 5 years ago

transparent_route Could look like this in transparent. Again note the circular shadows showing the way navit actually draws polylines.

hoehnp commented 5 years ago

@lains: I strongly agree to this issue. In the past I thought about using an auxmap to display a simplified version of the map on top of our usual drawing in case of any turns needed. Unfortunately I didnt follow it completely through. Maybe this could be an alternative solution. Which way do you prefer?

mvglasow commented 5 years ago

+1, I use a variation of the green line, as shown here:

https://wiki.navit-project.org/index.php/File:Screenshot_20190224-173811_Navit.png

IIRC the idea came from the Car-Android layout. I find that the cleanest design which can be accomplished using currently available graphics capabilities. Text is rendered on top and thus not obstructed by the route (and I would keep it that way). Conversely, if text is as long as the segment (or even longer), the text and halo may obstruct the route—but now that transparency is in the pipe, we may be able to make the halo semitransparent.

I wouldn’t use dotted lines for the route. On the other hand, dashed/dotted lines of arbitrary width would still be great to have for traffic rendering (unfortunately I am not nearly as familiar with the rendering part in Navit as I am with traffic, routing and maneuver generation).

pgrandin commented 5 years ago

I use a variant of this one as well : https://github.com/pgrandin/navit-nuc-layout/blob/master/nuc_layout.xml

I agree that it's more readable and overall looks better than the default layout. Maybe it's time to change the default layout?

mvglasow commented 5 years ago

Maybe it's time to change the default layout?

In fact… but that might be a separate issue, with even more potential for discussion.

hoehnp commented 5 years ago

@mvglasow: that was actually my original intention with the "split-screen" and auxmap. Unfortunately I lost a bit track of it. But probably i should start working on it again.