1. In the addNonClusteredItem function and the getBoundingBox function, the item.id in the called hasLabelIndex(entityCluster, item.id) is not a string, but an Entity object, so the function will always return false;
2. The addNonClusteredItem function and the getBoundingBox function, where the entityCluster._collectionIndicesByEntity [item.id] call cannot return the index, because item.id is not a string, so it will report an error.
Due to the above two problems, there is no influence on the aggregation of Label.
Thanks for digging into this and figuring this out! Would you be willing to make a pull request and contribute a fix to this? That would help get this fixed a lot faster and get it out there for the community, and we’d super appreciate it. If you haven’t already seen it, the contributing guide is a good place to start:
Sorry, I don't know how to make this request. I found these two errors in the Cesium source. I hope that you can resolve these two errors in the next release. When I use the code below to aggregate, I want to aggregate icons and labels, and when zoomed in to the icon display, the text will be displayed accordingly. However, the effect is that the icon appears, but the label does not appear. After debugging, I found two errors I mentioned above in the Cesium source code. When I modify it, the label will appear.
var entity = new Cesium.Entity({
position: position,
billboard: billboardObj,
label: labelObj
});
dataSource.entities.add(entity);
Why can't this forum send pictures? If you can send an image, please tell me how to send it, thank you. I only changed a few code, I don't think it is necessary to pull the request. If you can send pictures, I can specify these two places in the picture, you can quickly find this error.