CesiumGS / CesiumGS/cesium

Some camera functions seem broken in 2D

Open
#2,469 6 comments 1 reaction 0 assignees View on GitHub
category - 2d / columbus view category - camera type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

I was trying to zoom to lla `88, 0, 27e6` in 2D mode and neither of the below calls work (each on their own should accomplish the task.

_Doesn't work_

``` javascript
viewer.scene.camera.lookAt(Cesium.Cartesian3.fromDegrees(88, 0),
new Cesium.HeadingPitchRange(0, -Math.PI, 27e6));
viewer.scene.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
```

_Does the same thing as above (Doesn't work either)_

``` javascript
viewer.scene.camera.setView({
position : Cesium.Cartesian3.fromDegrees(88, 0, 27e6),
heading : 0,
pitch : -Math.PI,
roll : 0
});
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in 2D mode using the shown camera.lookAt, lookAtTransform, and setView calls with the 88, 0, 27e6 target. Start by comparing how these camera entry points handle 2D positioning and confirm the failure consistently. Done means the calls zoom to the requested longitude, latitude, and height in 2D mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.