-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Label/Billboard/Point clustering #4240
Conversation
… were clustered all of the billboards would be rendered.
…illboard images are impossible to clone without reading from the texture atlas.
…ing/disabling clustering.
…asources share a cluster to be clustered together.
If you run the Sandcastle and switch to 2D/CV, all of the labels and billboards are in the wrong position. That isn't a problem with the new code. The same problem exists in master with the KML Sandcastle example. I think the problem is in the clamp-to-ground code. |
Note that this is being merged into |
We don't mind the clusters being out of sync. Most of the movement in our time dynamic data is sub pixel at the zoom levels we will be using it at. We would appreciate a recluster() function that we can call to ensure that the clusters are updated once in a while. Clustering is one of the biggest feature requests that we get. Thanks for working on it. |
Have we thought about allowing cluster selection to see what's in the cluster? Not saying it needs to be part of this PR, but no default handling for a cluster seems incomplete. We've talked about multiselection in the past and having multiple tabs in the InfoBox to do it. (or we could show the clusters description, which if set, currently does nothing). |
</tr> | ||
</tbody> | ||
</table> | ||
<div id="toggleClustering"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make these checkboxes, the toggle button is confusing because you don't know what state it's in.
… Other minor updates from review.
@mramato We discussed the issues with how clustering works offline. I submitted changes to fix time-dynamic data like we discussed as well and fixed the issue when removing points. This is ready for another review. |
…dk-2.6.5 Update aws-sdk to version 2.6.5 🚀
…ron-prebuilt-1.4.1 Update electron-prebuilt to version 1.4.1 🚀
To experiment with custom styling, I tried making a point where the size depends on the size of the cluster (instead of a billboard). Is there a reason this doesn't work? removeListener = dataSource.clustering.clusterEvent.addEventListener(function(cluster, entity) {
entity.label = undefined;
entity.point = {
pixelSize : cluster.length
};
}); |
…Coordinates Fix off-by-one in compressing/decompressing texture coordinates
This was mentioned above. The labels are clamped to the ground and its broken. Open the KML example that uses the same KML file and you'll see the same behavior. |
The code that adds the cluster is here: https://github.com/AnalyticalGraphicsInc/cesium/pull/4240/files#diff-3ca360d29d7d55bfdc7322d4e18721e7R157 Its pretty limited because I wanted to keep it close to the cluster position and limit the size so it doesn't overlap other clusters. I'm open to any suggestions here. |
That breakage is worst than I thought then. We should fix this ASAP. I'll mark those issues as next release. |
@mramato I updated the custom styling like we discussed offline. This is ready for another look. |
The doc needs to be updated, but then I think this is good to go. |
@mramato The doc is updated. This is ready. |
Thanks @bagnell! |
Adds label, billboard, and point clustering. There is a new object on each data source called
clustering
. This has propertiesenabled
,pixelRange
andminimumClusterSize
. There is alsoclusterEvent
that is raised for every new cluster. The parameters to the callback are the array of entities being clustered and an entity that will be drawn for the cluster. Thelabel
andbillboard
properties for the second entity parameter are the only things considered when drawing the cluster.TODO:
CHANGES.md
LICENSE.md
forkdbush