Two bugs in Cesium aggregation

59 views
Skip to first unread message

10492...@qq.com

unread,
Nov 18, 2018, 11:00:04 PM11/18/18
to cesium-dev
In the EntityCluster class:

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.

Omar Shehata

unread,
Nov 19, 2018, 11:33:03 AM11/19/18
to cesium-dev
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:

10492...@qq.com

unread,
Nov 20, 2018, 6:52:07 AM11/20/18
to cesium-dev
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);

Omar Shehata

unread,
Nov 20, 2018, 9:18:14 AM11/20/18
to cesium-dev
A pull request is just a way to tell us what modifications you've made to the source code to fix that, and that way it can be reviewed and merged into the Cesium source. If you're interested you can read more about it here: https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request

In any case, can you post what modifications you've made to get it to work?

10492...@qq.com

unread,
Nov 21, 2018, 5:35:16 AM11/21/18
to cesium-dev

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.

Omar Shehata

unread,
Nov 21, 2018, 7:18:57 AM11/21/18
to cesium-dev
I tend to just use imgur (http://imgur.com/) when uploading pictures to share here.
Message has been deleted

10492...@qq.com

unread,
Nov 21, 2018, 9:47:19 PM11/21/18
to cesium-dev
Reply all
Reply to author
Forward
0 new messages