Object Camera focus

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

I am uploading a czml file that includes 2 satellites i am trying to zoom to the satellites in orbit when the file is uploaded.

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

I have attached my czml file and my HTML file.

i tried using :


but i see no change also i used this function that i found in examples:

        viewer.trackedEntity = dataSource.entities.getById('SAT1');

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

as of right now im just trying to zoom to 1 satellite but i would like to be able to view both satellites together and how they move around each other in one view.

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

I am using the most current version of cesium and google chrome is my browser

Feb26-Test.czml (142 KB)

index3.html (2.77 KB)

I can’t run your example because it seems to be missing a satellite gltf model. Are you able to recreate this in Sandcastle (or a Glitch app (https://glitch.com/edit/#!/cesium-template)?) this would make it easier for me to run.

Currently, the camera can only track/zoom to one entity at a time. To do this you could get the position of both satellites, compute some average position and have the camera zoom/fly to that to make sure they’ve both in view. There’s a couple of camera examples on Sandcastle, here’s one that might be helpful:

I currently don’t have a model for the satellite when I run it I have some text that says SAT1 and SAT2 that serve as the current model.