janbar / osmin

GPS Navigator On-Road/Off-Road for Android and Linux devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement: Misleading icons

Framstag opened this issue · comments

I do lice the icons during navigation very much.

I did however have a few situations where the icons where not 1:1 the situation on the road. I recently had the hint to leave the motorway with an icon that signal driving right. However I had the leave the motorway to the left since motorway ended at a T-shaped crossing ;-)

I had a similar effect in a roundabound where the exit number was correct but placed incorrectly in the icon which was irritating. I assume that the icons where "static stick" and not live rendered?

The pictures of the icons are all in the project libosmscout into the folder:

libosmscout/OSMScout2/pics/routestep

All static. Depending of the navigation module message type, we match the icon. All those icons are copied into the resource folder of the app: gui/images/way/

The matching is done using a map as the same as @Karry app for Jolla:

   iconMapping: {
        'information': 'information',

        'start': 'start',
        'drive-along': 'drive-along',
        'target': 'target',

        'turn': 'turn',
        'turn-sharp-left': 'turn-sharp-left',
        'turn-left': 'turn-left',
        'turn-slightly-left': 'turn-slightly-left',
        'continue-straight-on': 'continue-straight-on',
        'turn-slightly-right': 'turn-slightly-right',
        'turn-right': 'turn-right',
        'turn-sharp-right': 'turn-sharp-right',

        'enter-roundabout': 'enter-roundabout',
        'leave-roundabout-1': 'leave-roundabout-1',
        'leave-roundabout-2': 'leave-roundabout-2',
        'leave-roundabout-3': 'leave-roundabout-3',
        'leave-roundabout-4': 'leave-roundabout-4',

        'enter-roundabout-lhd': 'enter-roundabout-lhd',
        'leave-roundabout-1-lhd': 'leave-roundabout-1-lhd',
        'leave-roundabout-2-lhd': 'leave-roundabout-2-lhd',
        'leave-roundabout-3-lhd': 'leave-roundabout-3-lhd',
        'leave-roundabout-4-lhd': 'leave-roundabout-4-lhd',

        'enter-motorway': 'change-motorway',
        'change-motorway': 'change-motorway',
        'leave-motorway': 'leave-motorway',

        'name-change': 'information'
    }

That works very well. But sure some times the icon cannot be exactly like in the real world. Personally that is right for me...
A painter could generate ${UUID}.svg file for each "special" route step in a temporary folder and then clean up after the destroy of the routeStep. But it could be too complex for the usage. The actual solution is lighweight and so works well.

recently had the hint to leave the motorway with an icon that signal driving right. However I had the leave the motorway to the left since motorway ended at a T-shaped crossing ;-)

Improve this is on my todo list :-) Roundabout is parametrized by exit number and flag if it is clockwise (England) or counter-clockwise (continental Europe). But highway steps types (enter, change, leave) are not parametrized yet...

Make icons generated and use real geometry would be another level. But it would be really cool :-)