Entities - selection indicator and clustering


having issues related to entities:

1.I’m using entities clustering according to the demo: couldn’t find any field in neither entities collection nor viewer which tells whether a specific entity is being clustered or not.


2.My view is being updated every time I’m moving the camera,means that entities are being removed/added if needed (using something like FOV).

my problem is that when I’m selecting an entity and then moving the camera,the selection indicator starts jumping from one position to another,because the entity that was previously selected was deleted.

I’ve tried this:

let entity=viewer.selectedEntity;

but this one is just disabling the selection indicator, I want it to come back if I'm picking another entity again.

3. trying to use the icon attached as a billboard image but painting it doesn't work,am I doing anything wrong? other symbols I'm trying to use are being painted with their background?

image: symbol, color:RED,
scale: 1.5,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
rotation: orientation,

![download (1).png|50x50](upload://zFCuF3BYQ3jPs9qpQck5pIj6pbg.png)

For number 1, it looks like there is a callback that will tell you which entities have been clustered:


Does that give you what you need?

For 3, do you mean you’re trying to tint the billboard with the provided color? Notice that the provided color property is multiplied by the texture color. Since this image is black, multiplying any color by it won’t change it.

For 2, I might be misunderstanding it, but I’m having trouble recreating this. In this Sandcastle example, you can select the entity by clicking on it, and then right click to destroy it, and the selection indicator seems to go away correctly. You can also see here that if you set the viewer.selectedEntity to undefined that it should go away as well.

Hi Omar,

This won’t help me for number one , beacause I need to communicate with this event, I mean that I’m trying to tell in run-time for every entity, if it’s been clustered/declustered.

got it about number two.

for 3 , that’s not the issue I’m having,I’ve tried to capture it for better explanation but couldn’t get it.

the issue I’m having is selecting a target and afterwards moving my camera so the entity won’t be in the view,than the selector is starting to jump from one entity to another.

the question I’m asking is that,if is there a way to check whether the selected entity is deleted, and than “disable” the “current” selector.

That does sound like it would be nice if there was a property for each entity to tell you whether it’s clustered. I brought it up in the GitHub issue here:


There might a way to do this if you dig around in the source yourself. And of course a contribution is always appreciated!

For the entity selection issue, if the selector is moving around when the entity isn’t in view that’d be a bug. Can you recreate this in a Sandcastle example? I’d be happy to open an issue for it (or you’re welcome to do it as well). That’ll help us figure out what’s causing it and hopefully fix it quickly.

Haven't got that reproduced by now.

maybe that was a mistake in my code.