label and billboard eyeOffset in 2D mode renders twice

Hi,

When moving the camera In 2D mode if I have eyeOffset set for a billboard or a label the drawn position is incorrect. Also I see a second label get rendered intermittently and a light 'ghosty / foggy' area rendered next to the labels when moving camera around.

label:{
  text: 'eyeOffset is weird in 2D mode',
  eyeOffset: new Cesium.Cartesian3(0, 0, -10000)
}

Versions 1.22 & 1.22.1 - is this the expected or a bug?

Thanks,

Dan

Hi Dan,

I wasn’t able to reproduce this. Could you please send over a more complete code example?

Thanks,

Hannah

Hi Hannah,

var viewer = new Cesium.Viewer('cesiumContainer',{
    sceneMode: Cesium.SceneMode.SCENE2D
});
viewer.entities.add({
    position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
    billboard :{
        image : '../images/Cesium_Logo_overlay.png'
    },
    label: {
        text: 'label text',
        eyeOffset: new Cesium.Cartesian3(0.0, 0.0, -100000.0),
    }
});
viewer.entities.add({
    position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
    billboard :{
        image : '../images/Cesium_Logo_overlay.png',
        eyeOffset : new Cesium.Cartesian3(0.0, 0.0, -100000.0),
        color : Cesium.Color.RED
    },
});

when I zoom into the entities in 2D mode the position for billboards or labels wtih eyeOffset seems incorrect

Thanks,

Dan

Thanks Dan! I do see the issue now.
I think the problem is caused because your eyeOffset is so large. The value is measured in meters. Unless you have a reason for it to be so large, I would recommend a number like -10 or maybe -50.

-Hannah