PositionWC in 2d and Columbus mode


I have a problem about the PositionWC in 2d and Columbus mode. When I attempt to run the following code:

var viewer = new Cesium.Viewer(‘cesiumContainer’);

viewer.camera.moveEnd.addEventListener(function() {
console.log("positionWC: " + viewer.camera.positionWC);
console.log("position: " + viewer.camera.position);
console.log("Cartesian: " + viewer.scene.globe.ellipsoid.cartographicToCartesian(viewer.camera.positionCartographic));

The three coordinates are all different in 2d and Columbus mode. So what the definition of positionWC? Why the values between positionWC and the Cartesian coordinate converted from positionCartographic are different?

Thanks a lot~


camera.position is the actual position of the camera. This value is different between the three scene modes because it’s relative to the map projection.

camera.positionWC stands for position world coordinates. This value should be the same in 3D, 2D and CV. Also, position and positionWC should have the same value in 3D mode.

If you’re seeing a slightly different value for positionCartographic, it’s likely due to a tiny amount of precision loss from converting between the coordinate systems.

Hope this helps!


Hi Hannah,

Thanks for your response, but the values between positionWC and the Cartesian coordinate converted from positionCartographic are quite different in 2D and Columbus mode. The following example data are get from the codes of the first post:

positionWC: (12756274, 4261109.554612936, -2536374.734888654)
Cartesian: (27699581.315460104, 21858702.48189013, -14805005.192263555)

In addition, if I want to reproduce the camera position in 2D and Columbus mode using by the flyTo function, I need to use the Cartesian value. The camera position would be wrong when I used the positionWC value.

Does positionWC value include any bugs? Thanks a lot~

Hannah Pinkos於 2016年7月5日星期二 UTC+8下午10時01分05秒寫道:

Oh, actually we do have a bug open about positionWC in 2D and columbus view: https://github.com/AnalyticalGraphicsInc/cesium/issues/3845
I added a note of your forum post to that issue so we can let you know when we get a chance to look into it.



Hi Hannah,

You answer my doubt and thanks a lot~~