2D Circle - drawn incorrectly?

By default, the 2D mode uses a CartographicProjection. When you place some circles at different latitudes, then this is the result:

Cesium CartographicProjection

They will only be “perfect circles” when they are shown at the equator.

In contrast to that, when you are using the WebMercatorProjection, then it will look like this:

Cesium WebMercatorProjection

(Note that the size still appears to vary. There is no “right” way to map the surface of a sphere to a plane. There are only many different projections that are wrong in different ways…)

You can set that projection with

const viewer = new Cesium.Viewer("cesiumContainer", {
  mapProjection: new Cesium.WebMercatorProjection()
});

Here is a sandcastle for the last screenshot:

2 Likes