-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect rendering with line-dasharray + data-driven line-width #3682
Comments
@ansis Can you think of any way to fix this besides adding an extra uniform/attribute that stores "line width at the previous round zoom level", and then doing the calculation in the shader? It would be a uniform if the |
We could multiply by the line width at the tile's zoom level. This could result in more stretching/squishing for overscaled/underscaled tiles but I think it could be fine. This value doesn't change with zooming so it could be baked into a single attribute. |
@lucaswoj @mollymerp Should we roll-back data-driven |
I don't think we should roll back -- I think DDS for |
I'm really reluctant to get into the business of maintaining caveats like "property A supports data-driven functions, except not in combination with property B". That produces an API that where user expectations are confounded seemingly at random: a frustrating user experience. I think we need to fix this before shipping data-driven |
BTW, per the test-case added in mapbox/mapbox-gl-test-suite@1e04807 "incorrect" in this case means "nothing is rendered". |
@ansis do you have any time tomorrow to talk about what a fix to this would entail? Happy to put the time in to get this working properly. @jfirebaugh is it ok with you if we keep the original changes in |
@mollymerp sure |
After chatting w @ansis and @jfirebaugh it has become apparent that implementing this correctly will require either a breaking change to the style spec (converting line-dasharray units to pixels instead of relative values), adding many exceptions to the current way property functions are evaluated, or (from @ansis):
For now I will roll back DDS for |
I still think breaking the style spec is the way to go, but I'll try to refine my suggestion in the previous comment:
|
Removing release-blocker label since we've rolled back data-driven |
Tracking discussion for the breaking style-spec change here: mapbox/mapbox-gl-style-spec#633. |
Thanks @mollymerp! Let's move discussion there -- reading this bug can be kind of confusing now that the original issue no longer exists. |
Dashed lines rely on scaling the dash length by the line width at the previous round zoom level. Thought this code appears to respect data-driven properties because it has a
featureProperties
parameter, in fact this branch is evaluated only in contexts where this parameter is undefined, namely setting uppaint['line-dasharray']
for use here. (In effect a special-case of #3044.)This means that layers which combine
line-dasharray
with a data-drivenline-width
will not render correctly.cc @mollymerp @lucaswoj
The text was updated successfully, but these errors were encountered: