cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Include declustered entities in cluster callback

Open ggetz opened this issue 7 years ago • 6 comments

Requested on the Forum here: https://groups.google.com/forum/#!topic/cesium-dev/hUrOxJQjjzg

They would like a way to access the entities that have been unclustered in the cluster callback function when the event is fired.

ggetz avatar Aug 17 '17 19:08 ggetz

Requested again: https://groups.google.com/forum/#!topic/cesium-dev/fxr0jP5pB7c

ggetz avatar Nov 09 '17 22:11 ggetz

An alternative/additional design could be to expose a isClustered property to tell in real time whether a given entity is clustered. Brought up here: https://groups.google.com/d/msg/cesium-dev/i3PyrP4trng/gOU108AGCQAJ

How would that be to add?

OmarShehata avatar Sep 20 '18 18:09 OmarShehata

This would be useful to fix an issue I'm dealing with. Though there may be better fixes for the issue, perhaps someone can point me in the right direction if this could be the fix or if I should open a new issue:

I have some buttons which allow to show only certain categories of entities. So clicking on one of these buttons will hide all entities except those in the specific category; in case the entities are in that category they will be set to show. However I am finding when "activating" a category of entities, the entities that are clustered are correctly hiding the single billboards (only the cluster billboard is showing), whereas the single labels are not hiding (I'm seeing strange behaviour, such as empty labels showing, or a few characters of the labels showing!).

I thought a way to fix this might be to check whether each entity is in a cluster or not; if it's in a cluster I will explicitly hide it's label, if not I will explicitly show it's label. However I don't seem to have any way of telling whether an entity is currently in a cluster, since there is no "decluster" event...

I have put together an example in the Sandcastle. If you zoom into the area around Rome, where there are four markers, until all the markers are visible, and then click on the filter buttons at the top of the screen, not all of the labels will show when the markers show again. This is because I am keeping track of the latest "clustered" entities, but I have no way of knowing if they have been "declustered".

If you deselect "try to fix the label problem", you will see the original problem: try zooming far enough away that some entities will be clustered. Then try clicking on the filter buttons. When showing the entities for the Rome area, the cluster billboard will show but so will a few empty or partially filled labels 🤦

JohnRDOrazio avatar Apr 27 '21 08:04 JohnRDOrazio

any progress on this? still have issue when entities are no longer in cluster - can't identify them.

volski avatar Jan 23 '24 00:01 volski

@volski There hasn't been any activity on this item recently.

If you'd like to add more information about your use case, that may help us prioritize.

If you are interesting in contributing, please let us know and we'd be happy to discuss implementation or review a PR.

Thanks!

ggetz avatar Jan 23 '24 17:01 ggetz

Hello, We would love some kind of way to detect when a cluster has been de-clustered. Or, at the very least, get access to the previousClusters field in the EntityCluster class. It seems like it is a property but it is not exposed. This would allow us to dynamically add boundaries around our clusters so we can identify their outer limits. Any assistance would be greatly appreciated.

patrickgoldstein avatar Jul 29 '24 14:07 patrickgoldstein