CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
13.04k stars 3.51k forks source link

Clustering for Polygons (and polylines, etc) Not Supported #4656

Open billwritescode opened 8 years ago

billwritescode commented 8 years ago

Looks like clustering is only supported for billboards, points and labels in 1.27.

new Cesium.DataSource() DataSources/DataSource.js 20 ... snip clustering : EntityCluster DataSources/DataSource.js 96

Gets or sets the clustering options for this data source. This object can be shared between multiple data > sources. http://cesiumjs.org/Cesium/Build/Documentation/DataSource.html#clustering

new Cesium.EntityCluster(options) DataSources/EntityCluster.js 72

Defines how screen space objects (billboards, points, labels) are clustered. http://cesiumjs.org/Cesium/Build/Documentation/EntityCluster.html

Attempting to cluster polygons doesn't seem to be doing anything: https://sandcastle.cesium.com/?src=Hello%20World.html&label=Showcases&gist=5a8bc388758fb201c63b2403b58b81bc

ebogo1 commented 3 years ago

Requested again in https://github.com/CesiumGS/cesium/issues/9532.

andreasbhansen commented 3 years ago

Is clustering for other entity types in the pipeline? Would like to cluster by cylinder, but as this is currently not supported, my for-now workaround is to render a point entity for each cylinder (same latitude/longitude, but not visible to the user) , and then cluster by the points. It does not feel like a good workaround to double the amount of entities just to have clustering, however. Are there any better ways of clustering cylinders at the moment?