How to set z-index of different shapes in Cesium?

I have plotted a cylinder at some latitude/longitude and altitude with certain radius and height for the cylinder.

I have then plotted a image using billboard. The position of the image is inside the cylinder already plotted. The image comes behind the cylinder. Is it any way to plot the image above the cylinder just like z-index property in CSS.

Thanks in advance.


We don’t have great support for z-ordering. For the billboard, you may be able to use the eyeOffset property:

I’m not how well it will work since the billboard is inside the cylinder, but if you give it a large enough negative Z value, it might work.

Here is an example:

position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
billboard :{
image : ‘…/images/Cesium_Logo_overlay.png’,
eyeOffset: new Cesium.Cartesian3(0, 0, -50)




Thanks Hannah. It worked perfectly fine by setting up large negative value for Z :).