Load transparent geojson in 2D mode failed

1. A concise explanation of the problem you’re experiencing.

We made the transparency effectt by using the property named fill-opacity in geojson file. When the Cesium property named “clampToGround” setted true on loading the geojson file ,transparency effectt can be seen in 3D mode. But it has no effect in 2D mode.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

in 2D mode:

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

viewer.dataSources.add(Cesium.GeoJsonDataSource.load(‘transparent.geojson’, {



3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

We have some geojson to show in 2D mode

4. The Cesium version you’re using, your operating system and browser.

Cesium JS 1.52 & Cesium JS 1.59

transparent.geojson (383 Bytes)

I just tried this out, I forced 2D mode in the viewer constructor:

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

sceneMode : Cesium.SceneMode.SCENE2D


viewer.dataSources.add(Cesium.GeoJsonDataSource.load(’…/…/SampleData/transparent.geojson’, {




I can see the polygon is still transparent:

Can you take a screenshot of what you’re seeing? It is completely opaque? If so, what browser and operating system are you using? Can you try other browsers, or upgrading to the latest version of the browser you’re using?