Skip to content
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

dataSourceCollection order #12453

Open
GE-KI62 opened this issue Jan 27, 2025 · 1 comment
Open

dataSourceCollection order #12453

GE-KI62 opened this issue Jan 27, 2025 · 1 comment

Comments

@GE-KI62
Copy link

GE-KI62 commented Jan 27, 2025

What happened?

Hi all,

I have a question about Cesium's DataSource rendering behavior that seems counterintuitive. I've noticed two specific behaviors that I'd like to understand better:

  1. When adding multiple DataSources, newly added ones appear beneath older ones
  2. The rendering order works from bottom to top, where entities at the bottom of the stack appear in front

Check the sandcastle link to see an example.

When running this example, you'll see that:

  • the second DataSource is hidden by default since it's newer
  • using lowerToBottom() actually makes it visible by putting it in front

Is this the expected behavior? It seems counterintuitive.

Thanks in advance!

Sandcastle example

https://sandcastle.cesium.com/#c=rVJfb9MwEP8qVp5aqdhqH3jYsgooVRmrVsQiEFJeXPvamDq+yOckbIjvjp3SAWNDPOA33/3++XwKHQXWGejBswvmoGcLINPW/MNQG5WZGu4LdEEaB77MxuelUwOv9TaSyqwKoaEzIbzs+d6Eqt22BD5iArjAFdZitXx2dfl8Jl56VZkOhIcdiQqkJlFHWRGAws5Y4HvAz4SuzKLJyUbTNNrIXppwSrcCfBthr2WQN9h6Bdyi1KMYaMK+lo4xCh4PcHbCL9Ci5282xbvL66tJAkQ3+6CdeqX7Nh6sj3bHyXB970Ncaj2Kica/BZz9n4Cr98vl9VPxPi3X683Hfw04G58zIXpsrWbwpQEVWEBGAClt4v9g3iHWBf58kRBPCluMlQJfYQhY31vU8gA0jKAzZLYW/qrhpSEosMDmaBkFKqMHgWk2yXIKtxbmaQLpvDB1g35YtBHncUvqxsq4K2LbqgPE1SJKqRM0F79Sc206ZvTFI+vLlJVEsbNrrb0xd1Bm81xE/B/U9GPG7TcdeCtvE6yaztfHIuc8F/H6ODMg2q30D5S/Aw

@ggetz
Copy link
Contributor

ggetz commented Feb 4, 2025

Thanks for the report @GE-KI62!

Huh. This does seem to be unexpected, as least based on the behavior in the DataSource Order example. In that example, the second layer is shown above. And using "raise" and "lower" the first datasource does correspond to the order they imply.

I think it's something specific to GeoJSON datasource since CZML appears to be working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants