computeViewRectangle returns undefined in 2D when zoomed in

I’m running into issues getting the view rectangle when zoomed in. This happens in 2D mode, but not 3D.
Here is a snippet to recreate the issue:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

sceneMode: Cesium.SceneMode.SCENE2D

});

viewer.scene.camera.flyTo({

destination: Cesium.Cartesian3.fromDegrees(-90, 43, 50000),

duration: 0,

});

viewer.camera.moveEnd.addEventListener(logViewRectangle);

function logViewRectangle() {

console.log('camera.computeViewRectangle() is ' + JSON.stringify(viewer.scene.camera.computeViewRectangle()));

}

``

Thanks,

Jed

This appears to be an issue as well in Columbus View

Hello,

Thanks for reporting this! I’ve written up an issue on our GitHub so we can look into it: https://github.com/AnalyticalGraphicsInc/cesium/issues/4346

Best,

Hannah