We have a need to load and unload kml files based upon the camera distance to points on the globe. Basically, we’ve broken down our kml files into zones and we want to load the appropriate kml dynamically when the camera enters that zone, or is a certain distance to the center of the zone. The DistanceDisplayCondition looks like a good option, but it doesn’t support dataSources. I really don’t expect this to be a feature that is added, since the 3D tiles support will solve all of our problems with large data sets. I was just curious if there was some clever way to do this without doing the distance calculations ourselves.
Our best idea so far is to convert the kml to czml and then we add the DistanceDisplayControl directly into the czml. The problem is that will not load and unload the dataSources. Is there a way to create a callback when the near or far distances are tripped?