Finding the KmlDataSource from the picked Entity

When I pick a object that was loaded from kml object I get back an Entity. I’ve looked through the Entity object in the debugger to try to find a path back to the KmlDataSource. Is there a way to find the dataSource of an Entity if it was loaded from kml?

Thanks, Scott

This is a relative recent feature (1.16 or 1.17), but entity.entityCollection.owner will give you the KmlDataSource (or whatevere DataSource it came from).

Basically, an Entity now knows which collection it is in and the collection know which data source produced it. When we finally get around to Cesium 2.0, we will probably remove a layer yere and fold entityCollection and DataSource together.