Opened 7 years ago

Closed 7 years ago

#962 closed enhancement/feature request (fixed)

Clicking onscreen

Reported by: james gustavo rebelato Owned by: cp15
Priority: major Milestone: version 0.5.0
Component: gui/internal Version: git master
Severity: Keywords:
Cc:

Description

Hi

Exists in Navit option clicking onscreen and appear information POI?

I saw a picture of an internet screen Navit with the balloon of this type.

thank you

Attachments (3)

navit.jpg (4.5 KB) - added by james gustavo rebelato 7 years ago.
clicking onscreen
clickthrough.diff (11.6 KB) - added by tryagain 7 years ago.
First public release of clickthrough feature.
clickthrough-111215.diff (14.8 KB) - added by tryagain 7 years ago.
Some cleanup done, moved parts to graphics.c to make code reuseable for other gui types.

Download all attachments as: .zip

Change History (17)

Changed 7 years ago by james gustavo rebelato

clicking onscreen

comment:1 Changed 7 years ago by sleske

No, I don't think there is a way to show a popup with information about a POI on mouseclick.

Where did you see the picture you attached? Maybe it was made with a modified version of Navit?

Anyway, this is a good idea for a new feature.

comment:2 Changed 7 years ago by tegzed

I think this is the "Driver here" bubble of android version which comes up on double tap.

comment:3 Changed 7 years ago by tryagain

I'm working on this.

Patch isn't complete at the moment but idea is to do automagic click-through in the menu on the Earth icon, then POIs, then select first POI from the list and finally select View attributes.

This will be not a balloon but all attributes of nearest POI will be displayed and user will be able to get back above automagic steps to review POIs around, for example, or to add point to bookmarks. Seems to be quite intuitive to me.

comment:4 Changed 7 years ago by james gustavo rebelato

Great. Congratulations for the work.

Changed 7 years ago by tryagain

First public release of clickthrough feature.

comment:5 Changed 7 years ago by tryagain

With clickthrough.diff patch applied (it's not in production now) one will be able to include in gui_internal main menu part (for example, right after <a name='Main Menu'><text>Main menu</text> ) something like this:

     <img cond='button' src='gui_map' >
       <script>position(click_coord_geo,_("Map Point"),8|16|32|64|1024|2048)</script>
     </img>

This will fire up a <script> when main menu is fired by mouse button pressed on the map (that's what cond='button' is for). The script part will display map point of clicked position with its nearest displayed items (that's what 1024 is for) and then jump to attributes display of the topmost item besides above (2048).

Changed 7 years ago by tryagain

Some cleanup done, moved parts to graphics.c to make code reuseable for other gui types.

comment:6 Changed 7 years ago by tryagain

Above patch seems to be final. To turn it on navit.xml change is needed as per http://trac.navit-project.org/ticket/962#comment:5.

For those who love pois, new function is added to internal gui command interface, pois(click_coord_geo). It can be used instead of position() in above example to display POIs around the clicked point. As a second parameter, textual filter can be supplied, so you even can configure Navit to display pubs around clicked point: pois(click_coord_geo,"pub").

comment:7 Changed 7 years ago by tryagain

Feature is added in r4864.

I've made it a default as it seems to be intuitive to get clicked item info when you tap the map. If you need main menu, you always can get back in the menu or use an osd item for that.

Please note that in applied version, flag=256 is to display visible items around clicked point and flag=1024 is to display attributes of topmost item besides them.

comment:8 Changed 7 years ago by tryagain

  • Resolution set to fixed
  • Status changed from new to closed

comment:9 Changed 7 years ago by korrosa

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi tryagain.

Some good work here again!

Can we get a subtle change? Now, wherever I click on the map in a city, I will only ever go into the POI attributes screen, whether I've clicked on a POI or not. This is because of large polygons. Round my area we have a lot of residential polygons - I don't really care about their attributes. Same goes for roads - clicking on a road should probably get me to the "Map point" screen, rather than the attributes screen. What do you think?

comment:10 Changed 7 years ago by tryagain

Hi Korrosa,

Thank you for your feedback.

Many roads have names, and attributes will give you that information, even if zoom factor doesnt allow name to appear directly on the map. Also you may see road class and access restrictions in the attributes screen.

Some of polygones may have names too, like water areas, town or district polygons, forests etc.

For all above objects attributes screen will have a value. So I think, to be consistent, it's good to always display attributes screen.

Anyway, if you click on POI, you should see that POI attributes, not the undelying polygone ones. If it's difficult to click on POI, you may tune the radius attribute of <gui>.

So I do not agree with your idea to switch off attribute display based on item class (point/way/area). If you have a better idea, you're welcome.

comment:11 Changed 7 years ago by korrosa

The issue I have is that I think that the average user will not care about the attributes of a road or polygon as much as they will about a POI.

If I click on a point on a road I will most probably want to route to that point, not want to see its extended attributes. The only attribute I tend to care about on a road is its name, and this is usually displayed on the map. Furthermore, a new user may be confused at first that by clicking on the map he or she will jump stright to a load of text, and not to the Main Menu (http://wiki.navit-project.org/index.php/File:InternalGui-MainMenu.png).

Perhaps a solution could be: combine the Map Point (http://wiki.navit-project.org/index.php/File:InternalGUI-MapPoint.png) and Attribute pages into one page?

Note that this is personal opinion though, and I know that I can just remove the feature if I want to!

comment:12 follow-up: Changed 7 years ago by number6

I hate to be a bearer of bad news, but r4864 breaks the build on the iPhone and Mac.

In file included from /Users/number6/4865/navit/graphics/cocoa/graphics_cocoa.m:7: /Users/number6/4865/navit/graphics.h:188:1: error: unknown type name 'GList' GList *displaylist_get_clicked_list(struct displaylist *displaylist, struct point *p, int radius);

I'll have a look at this over the holidays.

comment:13 in reply to: ↑ 12 Changed 7 years ago by tryagain

Replying to http://wiki.navit-project.org/index.php/user:number6: Build on the iPhone and Mac is fixed by Number6 with r4866

comment:14 Changed 7 years ago by tryagain

  • Resolution set to fixed
  • Status changed from reopened to closed

Don't show too much details as suggested by korrosa and Ciprian Alexan (see #1010) done with r4934

Note: See TracTickets for help on using tickets.