Updating ellipse graphics semiMinor/MajorAxis does not lead to shape update

1. A concise explanation of the problem you're experiencing.

I am trying to update the radius of a circle using ellipse graphics, but if I edit just the semiMinor/MajorAxis doesn't induce a circle update, the same way that changing the position of the circle does. Is there a "dirty" bit or something I can set so that the circle will update?

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

entity.ellipse.semiMinorAxis._value = radius;
(is there something else I can set so that I can trigger an image update?)

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am using two billboards to update the position of the circle, as well as the radius. A change in position triggers an update in real time, but a change in axis doe not.

4. The Cesium version you're using, your operating system and browser.

Cesium 1.47, Centos, Firefox

Same issue with rectangle coordinates.

The Cesium API makes an assumption that all entities are static by default to speed up performance. So using a CallbackProperty (https://cesiumjs.org/Cesium/Build/Documentation/CallbackProperty.html) for any property that needs to change over time is the intended way of doing this.

You can see that an Ellipse is marked as dynamic if any of its properties are a callback property:


And that’s what triggers the geometry to update:


Thank you! Is this the same for ellipse graphics?

Yeah I believe EllipseGraphics is the public class and EllipseGeometry is used under the hood.

The mistake is that you are setting the private _value property which bypasses all of the update logic.

entity.ellipse.semiMinorAxis._value = radius;

You should never use any property whose name starts with an underscore, because those properties are private.

To change the value of a constant property, you assign to the property itself:

entity.ellipse.semiMinorAxis = radius;

Or, if you expect the value to change frequently and unpredictably, use a CallbackProperty as Omar suggests.

yeah. Never use the underscore values. I mentioned that awhile back.