Rendering error when using CustomDataSource and CallbackProperty

1. A concise explanation of the problem you're experiencing.

Rendering error occurs when using CustomDataSource and some CallbackProperty.
Error log have attached.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

Please push "Remove" button.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I want to group polylines, polygons, etc. and move them.

4. The Cesium version you're using, your operating system and browser.

Windows 10 Pro
Firefox 66.0.3


I think this is a bug. Thanks for posting a code example! I opened a bug report here:

It seems to only happen if both entities have a CallbackProperty. A workaround for now would be to store the entities in arrays yourself, and iterate through and remove when you want to remove a group. Let me know if that works for you. Feel free to chime in on the GitHub issue as well!

It was solved by the proposed method.

2019年4月19日金曜日 6時56分59秒 UTC+9 Omar Shehata:


I seem to have a similar issue the original poster has. My Cesium knowledge is limited but so far I have managed to get two custom datasources with entities that each have callbackproperties and it works as long I dont delete/clear/reset the datasources. If I reset the datasources, I get the destroy() error - exactly like the example given above.

With regards to your proposed solution. Do we keep both datasources and just pass the arrays with entities to the Custom datasource or do we remove the datasources and just add the array of entities directly to the viewer, if so, how?

If possible, could you update the sandcastle sample to include the solution?

Kind Regards,

In my proposed solution, you would no longer be using data sources at all. You’d just have simple JavaScript arrays instead and add the entities directly to the viewer. I’ve updated the Sandcastle with an example of this here.