Sudden disappearing / "blinking" of POI icons #2318

Open
opened 2022-03-30 07:53:04 +00:00 by AntonM030481 · 6 comments
AntonM030481 commented 2022-03-30 07:53:04 +00:00 (Migrated from github.com)

For some reason some icons on map disappear. E.g.
om://8yx1FR-URb/Maria_Efthimiou
During zoom-out Pharmacy "Maria..." icon disappears.
Maybe because of bar "Quotes..." and its text.
General rule is to prioritise icons compared to text, right?

The same here:
om://8yxfv6swqu/C_Roushas_%26_Co.
During zoom-out "C Roushas..." disappears.
Maybe because of bar "Rolla..." and its text.

For some reason some icons on map disappear. E.g. om://8yx1FR-URb/Maria_Efthimiou During zoom-out Pharmacy "Maria..." icon disappears. Maybe because of bar "Quotes..." and its text. General rule is to prioritise icons compared to text, right? The same here: om://8yxfv6swqu/C_Roushas_%26_Co. During zoom-out "C Roushas..." disappears. Maybe because of bar "Rolla..." and its text.
biodranik commented 2022-03-30 09:15:33 +00:00 (Migrated from github.com)

There are some priority rules for features. What is the expected behavior? Can you please provide screenshots to compare?

There are some priority rules for features. What is the expected behavior? Can you please provide screenshots to compare?
AntonM030481 commented 2022-03-30 11:32:58 +00:00 (Migrated from github.com)

In fact, it's even more strange.

  1. Normal state. Bar and pharmacy are visible:
    image
  2. Zoom-out. Bar is visible (with name), but no pharmacy:
    image
  3. Zoom-out more. No bar, but pharmacy is visible again! (without name)
    image
In fact, it's even more strange. 1. Normal state. Bar and pharmacy are visible: ![image](https://user-images.githubusercontent.com/85622715/160824897-07bcf647-29dc-4789-95b6-3ff6cd7f2273.png) 2. Zoom-out. Bar is visible (with name), but no pharmacy: ![image](https://user-images.githubusercontent.com/85622715/160824564-a793b19a-7cbc-4d76-83b4-3e66528686b9.png) 3. Zoom-out more. No bar, but pharmacy is visible again! (without name) ![image](https://user-images.githubusercontent.com/85622715/160824793-4d9a0089-4c33-4b2f-ba29-c0ac3d377234.png)
AntonM030481 commented 2022-03-30 11:51:04 +00:00 (Migrated from github.com)

Expected behaviour (for icons and names).
Draw order (don't draw if intersected with already drawn items):

  • Top priority icon
  • ... other icons ...
  • Bottom priority icon
  • Top priority name
  • ... other names ...
  • Bottom priority name
Expected behaviour (for icons and names). Draw order (don't draw if intersected with already drawn items): - Top priority icon - ... other icons ... - Bottom priority icon - Top priority name - ... other names ... - Bottom priority name
Owner

A bar has a lower z-index priority compared a pharmacy.
A bar is displayed starting at z15, a pharmacy - from z16.

But it doesn't quite explain the observed behavior, right? :)
ATM OM lacks continuity in displaying features at different zoom levels indeed.

My guess (I didn't see the code yet) is that the z-index is not respected by the algo which chooses which POIs to omit from the display. Probably z-index is used only to determine which type to display when there are multiple types at the same node.

Update: actually a bar is taking priority over pharmacy because the algo prefers POIs with lowest minZoomLevel first and only after that ranks by z-index

A bar has a lower z-index priority compared a pharmacy. A bar is displayed starting at z15, a pharmacy - from z16. But it doesn't quite explain the observed behavior, right? :) ATM OM lacks continuity in displaying features at different zoom levels indeed. My guess (I didn't see the code yet) is that the z-index is not respected by the algo which chooses which POIs to omit from the display. Probably z-index is used only to determine which type to display when there are multiple types at the same node. Update: actually a bar is taking priority over pharmacy because the algo prefers POIs with lowest minZoomLevel first and only after that ranks by z-index
AntonM030481 commented 2022-03-31 13:53:56 +00:00 (Migrated from github.com)

From user point of view I expect following (according to the screens above):

  1. OK (all visible)
  2. Bar icon is visible, but no name (because of pharmacy icon has more priority over any name). Pharmacy icon and name are visible.
  3. OK (only pharmacy icon is visible because of higher priority).
    As a general rule: names of POI always have lower priorities compared to any icons
From user point of view I expect following (according to the screens above): 1. OK (all visible) 2. Bar icon is visible, but no name (because of pharmacy icon has more priority over any name). Pharmacy icon and name are visible. 3. OK (only pharmacy icon is visible because of higher priority). As a general rule: names of POI always have lower priorities compared to any icons
Owner

And here is why at lower zooms a pharmacy only is displayed and no bar (though it has a higher priority considering its minVisibleScale):

closely placed POIs that likely to "cover" each other are omitted from the scale index at the map generation stage (see displacement_manager.hpp::Displace() which is used in scale_index_builder.hpp::IndexScales()), which makes perfect sense as an optimization, but the issue it uses different POIs priority calculation compared to the runtime POI displacement code, namely the scale index code doesn't use minVisibleScale, but only a z-index derived priority. Hence the pharmacy displaces the bar from the scale index at lower zoom levels and the bar is not rendered.

At higher zoom levels the bar appears in the scale index and contests pharmacy for the screen space and wins because it has a higher priority (which includes minVisibleScale now). At even higher zoom levels the pharmacy is displayed again because there is enough space for both POIs.

Hence the pharmacy "blinks" while zooming in/out which is quite annoying and ruins UX.

The fix is to make scale index displacement code use the same priority calculation as runtime code (i.e. include minVisibleScale into the mix).

Related to another POI priorities issue #2332

And here is why at lower zooms a pharmacy only is displayed and no bar (though it has a higher priority considering its minVisibleScale): closely placed POIs that likely to "cover" each other are omitted from the scale index at the map generation stage (see `displacement_manager.hpp::Displace()` which is used in `scale_index_builder.hpp::IndexScales()`), which makes perfect sense as an optimization, but the issue it uses different POIs priority calculation compared to the runtime POI displacement code, namely the scale index code doesn't use minVisibleScale, but only a z-index derived priority. Hence the pharmacy displaces the bar from the scale index at lower zoom levels and the bar is not rendered. At higher zoom levels the bar appears in the scale index and contests pharmacy for the screen space and wins because it has a higher priority (which includes minVisibleScale now). At even higher zoom levels the pharmacy is displayed again because there is enough space for both POIs. Hence the pharmacy "blinks" while zooming in/out which is quite annoying and ruins UX. The fix is to make scale index displacement code use the same priority calculation as runtime code (i.e. include minVisibleScale into the mix). Related to another POI priorities issue #2332
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#2318
No description provided.