Esri / feedback-js-api-next

Try out the next release of the ArcGIS Maps SDK for JavaScript and share your feedback. Be warned: this release is still in development and is unstable.
87 stars 23 forks source link

Bug: semi-transparent line rendering issues #10

Closed dpocius closed 5 years ago

dpocius commented 5 years ago

Describe the bug Some parts of semi-transparent lines are rendered incorrectly

To Reproduce Steps to reproduce the behavior:

  1. Go to https://jsbin.com/sadewufibi/edit?html,output
  2. Observe line rendering issues: a) Some non-overlapping parts are rendered as overlapped in higher zoom levels b) Line caps are rendered as non overlapping when that line part overlaps itself (case of u-turn)

Expected behavior Consistent rendering of overlapping and non-overlapping parts of line

Screenshots https://i.imgur.com/Ki7Umij.png (parts of line where it is rendered incorrectly marked in green rectangles)

Browser (check https://whatismybrowser.com/)

What's your OS? (check https://whatsmyos.com):

API version (check your console)

Additional context

mmgeorge commented 5 years ago

@dpocius what is the desired behavior in this case? That the feature does not appear to overlap with itself (sane transparency throughout the feature, including the overlapped parts)? Or is the concern with the caps not appearing to overlap in some cases:

cap2

dpocius commented 5 years ago

@mmgeorge Desired behavior here is consistent rendering. If part of line is darker because it overlaps itself, then, I think, line cap (which you have marked in screenshot) should also be darker. Current rendering, when line cap is rendered as not overlapped while all other part of line is overlapping, does not look nice and I can't think of a reasoning from end-user's perspective when this would look valid and not confusing. On the other hand, if same transparency level would be kept throughout entire polyline, including overlapping parts, there wouldn't be any problems with line caps too. So, I think, keeping same transparency troughout entire feature is also a valid possible behavior.

mmgeorge commented 5 years ago

@dpocius well, even if the cap was darker it would still not look great. Maintaining the same transparency throughout the polyline would look better, but this would require quite a bit of work and would likely not be for quite some time. Unfortunately rendering semi-opaque lines is an issue a lot of map engines on the web.

Current rendering, when line cap is rendered as not overlapped while all other part of line is overlapping, does not look nice and I can't think of a reasoning from end-user's perspective when this would look valid and not confusing.

I don't think the use-case for having it this way is about visual quality so much as performance. We don't want the rendering of overlapping semi-opaque lines to slow down much more common workflows. We'll take a look at what we can do for the caps, but I'm not sure we'll be able to prioritize this.

bsvensson commented 5 years ago

Hi @dpocius

Thank you for your interest in the next version. About the issue tracking in this github repo: