We're making heavy use of polygon outlines on polys with height=0. We'd like to make use of the new zIndex feature. Unfortunately, zIndex doesn't work when height is specified, and outline doesn't work when height isn't specified. Does anyone have input on how we could make both outline and zIndex work at the same time?
I took a brief look at the code to see if I could make zIndex work in the specific case when height is 0. Would you accept a patch that accomplished that, assuming it's technically feasible? And could you help me narrow down what needs to be done?
So I did some digging, and the reason this doesn’t work is because Cesium creates a GroundPrimitive instead of a regular Primitive when height isn’t set, and zIndex only works for a GroundPrimitive.
One workaround you could do is to use polylines that are clamped to ground as the outline.
If you are willing to add support for this yourself, we’d definitely welcome and appreciate a contribution! This GitHub issue has some discussion on implementing this: