Help flying to a Rectangle using sceneMode: Cesium.SceneMode.SCENE2D

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

Flying to a destination from a Rectangle when the view sceneMode: Cesium.SceneMode.SCENE2D is not working as expected.

const rectangle = Cesium.Rectangle.fromDegrees(left, bottom, right, top)

const destination ={



When I use a SCENE3D the flyTo works correctly, but using SCENE2D it goes to unexpected places.

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

It’s reproducible on sandcastle:

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

I store a rectangle so when I pick a location I can zoom into the rectangle location with this snippet;

This looks like a bug to me. I opened an issue here:

You can pass a rectangle to the destination when doing, that seems to work correctly in 3D and 2D. Does that work for you?

Yes, it’s working using the rectangle. Thank you so much!

Following up on this, seems like after flying to the rectangle the method camera.computeViewRectangle() is returning undefined.

Do you have a change to give it a check? I modified your sandcastle a little bit here

Well seems more like the rectangle is not available in America