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
Alleviate tile gaps in chromium by using mix-blend-mode CSS #8891
Conversation
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should cherry pick to v1
this and ship it with 1.9.4
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this locally and it seems to indeed resolve the issue in Chrome.
Co-authored-by: Jon Koops <jonkoops@gmail.com>
I cherry-picked this CSS change to apply for a project that uses Leaflet 1.8 and it created problems with the colors of overlying markers. I don't know if anyone's tested this in combination with markers based on SVG file-based icons but it might be a good idea to verify that it doesn't break them. |
@joeberkovitz Could you please open a bug report with that info? I haven't done throughout testing, but if you can provide a minimal test case where colours of overlaying markers are affected, that'd be very useful. |
@IvanSanchez I've opened bug #8905 which demonstrates the issue. It turns out to need a more refined test case than just straight-up markers, it requires a custom GridLayer displaying vector point data using SVG icons from adjacent tiles where the icons (not the tiles) overlap. I've explained why I think this is a valid use case in the bug. |
@mhirsch please report this as a new issue with some steps to reproduce it. |
Please note this CSS property has a performance cost associated with it. Our client uses virtualised desktops that don't have access to a GPU and we lost 10-20 FPS when we upgraded to Leaflet 1.9.4. Took me a while to trace it back to this, but fortunately it's easy to override the style and turn this off. We've never noticed the issue it's supposed to address. You should be able to see it for yourself. Just turn off hardware acceleration in your browser settings, show the dev tools FPS meter, and pan a map around. Toggle the CSS property between |
This alleviates the dreaded tile gaps of #3575, in a clean way, with no downsides that I'm aware of.
The tile gaps are still visible if the page zoom is not 100%, however (see #3575 (comment)).
Credit goes to @lapo-luchini (see #3575 (comment)).