Adding and Removing entities Dynamically based on the Height of the Camera

Hi,

I am working in the idea of "Adding and Removing entities Dynamically based on the Height of the Camera". It will have following steps:

1)Initially,when the Globe is loaded with by default some Entities e.g.Red box, each Box will be representing cluster of point.And based on the number of point each Box will be having different heights

2)Next, when user Zoom into place at a particular level of Height, Red Box should get dispersed into the smaller box representing many points in that area.

3)And once user Zoom into the Ground level, each block will get dispersed into Pin builder.

4)And once user Zoom out the same scenario will reverse

I am able to find height with the help of

"ellipsoid.cartesianToCartographic(camera.position).height"

I am thinking:
1)After finding and particular level of height.I will be triggering a function which can create Entities into focused area.But My concern is that how can i find that particular point with Latitude & Longitude is lying in that focused area.

Thanks in Advance

First create a callback method that will set the correct visibility of the entities based off of the camera.

Then, depending on the effect you desire, you can either hook that into the camera’s FlightCompleteCallback or the scene preRender.

FlightComplete will only change visibility when the movement is complete and the preRender will change it immediately when the camera passes your height thresholds.