Camera.computeViewRectangle doesn't work in 2D or CV
See original GitHub issueReported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/Ildibeod608
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()));
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:23 (13 by maintainers)
Top Results From Across the Web
Camera.computeViewRectangle doesn't work in 2D or CV
I implemented a solution as described here to capture the view before a morph and reset it on morph complete, and it works...
Read more >Cesium - Camera.computeViewRectangle to get current view ...
On the first line, Rectangle.fromDegrees needs 4 input parameters, not 2. Next, computeViewRectangle is not a static function, you have to call ...
Read more >camera.computeViewRectangle not working with terrain ...
Hello. My company has been using Cesium for about a year now to develop a viewer for Wide Area Motion Imagery (WAMI).
Read more >Camera.computeViewRectangle() does not cover all the ...
When I move camera toward South Pole, the view rectangle returned by Camera.computeViewRectangle() does not contain all the visible area.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve used this. (Cesium.Rectangle)
I just ran into this issue as well. Are there any updates on a fix?