I’m working my way through some of the Cesium examples and tutorials, and I have a working prototype that can load geoJson and perform some basic manipulation of polygons (change color from a button click). My question is, what is the relationship between entities and primitives? After loading my data, which contain 2 points and 1 polygon, I see that there are 5 primitives created:
- Two primitives are “blank”: they have no appearance, instanceIds, or other properties that the other three entities have
- One primitive is a billboard array for points
- Two primitives appear almost identical for the one polygon. The only difference appears to be their _primitiveType. One is _primitiveType: 1 and the other is _primitiveType: 4. Are two primitives created for each polygon, one for the shape itself and one for the border? Or is something else going on?
I’m incorporating Cesium into a larger application, and eventually what I want to do is be able to click on something elsewhere in the application and pick/change/do something with the corresponding object in Cesium. Is there a recommended best practice for manipulating objects in Cesium? For example, if I want to change an entity that has a PointGraphic and replace the PointGraphic with an image billboard, should I remove the primitive and add a new one? Or is there a better updating method?