can i flyto/zoom to a bounding box?

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

Im automating video production for a large number of countries and don’t want to manually set zoom levels for each one.

I have bounding boxes for 180 countries - i would like to navigate and zoom to them using cesium. I dont know if there is some method i can use, or if flyToBoundingSphere applies in this situation. I currently use flyto which is insufficient for zoom reasons.

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

this is my original flyto, which doesn’t account for country size:

camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(targetX, targetY, zoomLevel), duration: 5.0,

complete: () => {}) })

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

Im automating video production for a large number of countries and don’t want to manually set zoom levels for each one.

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

1.56, mac, chrome

Check out https://cesiumjs.org/Cesium/Build/Documentation/Camera.html?classFilter=camera#flyToBoundingSphere

Here’s how we fly to a rectangle in TerriaJS:
https://github.com/TerriaJS/terriajs/blob/master/lib/Models/Cesium.js#L581