NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
41 stars 26 forks source link

z-order confusion in Cesium Map with mixed 3D and imagery layers #2201

Open mbjones opened 11 months ago

mbjones commented 11 months ago

Describe the bug When a portal shows a cesium map in a portal with multiple layers, the top-most layer does not show as fully opaque even when it is set to be 100% opaque.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://permafrost.arcticdata.io
  2. Click on the 'eye' icon on the "Permafrost Zones" layer to enable it
  3. Verify that the default IWP layer is also enabled and set to 100% opacity (which it is by default)
  4. Zoom in to a region with dense polygon features and where multiple permafrost zones can be seen
  5. Note that as the underlying image color color changes (e.g., from yellow to blue), the color of the overlaid IWP polygons changes from yellow to green. See screenshots.

Expected behavior Polygons in opaque layers should be opaque with respect to the underlying layers, and should not change color. Only when transparency is set to < 100% should the color of the polygons be affected by the underlying layers.

Screenshots

image

The effect is even more visible when the Bing satellite layer is disabled:

image

Desktop (please complete the following information):

robyngit commented 11 months ago

@mbjones The issue you're observing is because of the two different types of data layers. The Permafrost Zones layer is a 3D Tileset. The IWP layer as we have it now is an imagery layer. The spatial positioning of 3D features is defined by the x-y-z coordinates - we can't easily reorder them the way you'd expect in a 2D map. Of course, none of this is obvious to the user, especially because the Permafrost Zones layer doesn't have any height to it. Perhaps the short-term solution is to re-process the Permafrost Zones layer as imagery. In the longer term, we probably need to deign the UI to reflect this somehow. Perhaps as part of https://github.com/NCEAS/metacatui/issues/1769. What do you think?