-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Improve custom layer compatibility #2296
Comments
@sakitam-fdd Thanks for reporting! We are of course interested in improving compatibility with other systems, however using https://webglfundamentals.org/webgl/lessons/webgl-anti-patterns.html.
We could use |
@ibgreen Thank you for your reply. A straightforward reason for this is that instead of drawing in a unified |
@ibgreen Thanks for your attention! @maptalks 's maintainer here. The problem here is in maptalks, all the layer canvases are pre-rendered off-screen, where clientWidth and clientHeight are always 0. Meanwhile, clientWidth and clientHeight are read-only properties, so they can't be updated by upper module. Thus it would be nice if deck.gl can fall back to canvas's width/height when clientWidth and clientHeight are 0. This should solve this off-screen canvas problem. Thanks! |
Resolved by #2405 |
Fix published in deck.gl@6.3.3 |
Background
For #2264 mapbox custom layer integration, it introduces an external GL context for mapbox. It's exciting, but for other map engines like maptalks canvas in the GL context created externally is not rendered correctly,and I've found some reasons:
Externally created temporary canvas does not update
clientWidth
andclientHeight
, so I modified the following two places.https://github.com/uber/deck.gl/blob/4779b1040c6379c713f1a8b2d6b688b2b2909982/modules/core/src/lib/deck.js#L358
https://github.com/uber/deck.gl/blob/4779b1040c6379c713f1a8b2d6b688b2b2909982/modules/core/src/lib/draw-layers.js#L40
clientWidth => width
clientHeight => height
This is the examples maptalks.deckgl
To Do List
The text was updated successfully, but these errors were encountered: