Label.computeScreenSpacePosition only working for 3D?

Hello,

I am trying to use the Label.computeScreenSpacePosition function provided by the Cesium API to locate where certain labels are on the map.

This method is working fine when in SceneMode.SCENE3D, but when in SceneMode.SCENE2/2.5D I am getting inaccurate values.

The values I am getting back from SceneMode.SCENE2/2.5D are not accurate and one big indicator for this is sometimes the x coordinate value returned is larger than the window.innerWidth value. I am wondering if there is a different way to compute labels and billboards screenspace position when in 2D or 2.5D?

I am using Cesium 1.20

Thanks!

Rodney

Hello Rodney,

I think this problem might be related to this issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/3920

We plan on trying to fix that soon. I posted a link to your forum post so we can make sure your issue is fixed as well.

Best,

Hannah

Hello Rodney, is yours fixed now with the latest version? I am seeing the same thing, but I am upgraded to version 1.22.

The X values for my billboards are very large negative numbers, even when the billboard is in the middle of the screen. This seems to only be happening when I zoom in; at the whole-world level, the values are ok.

Also, I noticed that all of my billboards, regardless of where they are on (or off) the screen, have the same exact (incorrect) X value when I zoom in. The Y values are different, but the X’s are all the same. For example, I am currently seeing all billboards (some on the screen, some off), have a computed screen space X value of exactly “-2223.226167891246”.

If this is still known to be an issue, I’ll wait to re-test till it’s determined to be fixed. Otherwise I can set up a Sandcastle example to illustrate.