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
re-arranging layer order / z-index #57
Comments
ah, my mistake - reordering works, needs to be the last item not the first item though |
I apologize in advance if this has been documented, is there a way for individual data points within a single layer to have a z-index? Currently I been doing what was mentioned here, essentially having individual layers for icons that i want to appear on top. I tried using the third position on the position attribute |
@locomotif Which layers are you working with? Most layers support a third (z) coordinate. Not sure I understand your use case? Are you having z-fighting issues within your layer? |
@ibgreen sorry for not being completely clear, and thank you for your reply. I am working with IconLayer, and PathLayer. Say I have N amount of paths rendered on a single PathLayer instance. Currently all paths have the same color, and there are some paths that overlap. I want to be able to change the color of a single path on a single PathLayer with N paths, and have it render on top of all paths. I tried sorting the |
@locomotif Controlling the order in which paths render is tricky since we use instanced rendering in deck.gl - all paths are drawn "in parallel" with a single GPU draw call - this is one of the tricks we use that are critical for deck.gl's rendering performance on big data. It so happens that we are developing a new You could try to copy it to your app, but unfortunately I will not recommend that you do that it just yet, it will likely be more pain than it is worth. You might need to use deck.gl 4.2, which is still in alpha and rapidly changing. A couple of weeks from now things should look better. For now your best bet might be to use minuscule z deltas in the layer positions for each path (and make sure to turn on depthTest). Experiment and see what works. |
What I'm trying to do: Multiple layers, when one is selected the z-index should be 1 while others are 0 so the data points from the selected layer are visible over ones not selected.
What worked: Multiple DeckGLOverlays with one layer each, then use CSS z-index on each overlay
What isn't working: One DeckGLOverlay with multiple layers.
I've tried two approaches:
assert.js:137 Uncaught AssertionError: Matching layer has no state
)Is there currently a way to do this?
The text was updated successfully, but these errors were encountered: