Crash with empty position properties and ellipse

Hi guys. I've noticed that if you have an empty property there seems to be no issues with billboards or ellipsoids, but if you add an ellipse it causes a crash.

I will often have empty properties as I dynamically load and unload position data. Is this expected to crash? And if so, is there a way to work around it?

Paste the below into sandcastle, run, and then uncomment the ellipse part to re-create the crash:

var viewer = new Cesium.Viewer('cesiumContainer', {sceneMode: Cesium.SceneMode.SCENE2D});

var property = new Cesium.SampledPositionProperty();

// Create entity
var billboard1 = viewer.entities.add({
    position : property,
    billboard :{
        image : '../images/Cesium_Logo_overlay.png',
        color : new Cesium.Color(0.0, 1.0, 0.0, 0.5)
    },
    ellipsoid : {
        radii : new Cesium.Cartesian3(700.0, 700.0, 0.0),
        material : Cesium.Color.BLUE.withAlpha(0.025)
    },
    /*ellipse : {
        semiMinorAxis : 3000.0,
        semiMajorAxis : 3000.0,
        material : Cesium.Color.GREEN
    }*/
});

Thanks!

Thanks for reporting this! I think it’s a bug. I submitted an issue here: https://github.com/AnalyticalGraphicsInc/cesium/issues/3796
If you comment out ‘position: property’, the code will run. So I think the best workaround for now would be to set position: undefined when you have an empty property.

Best,

Hannah

Thank you Hannah,

I can always use a flat ellipsoid to work around it for now!