Is there such thing as opacity for geojson data source and/or entity/primitive styling?

I don’t see anything related to it here:


Say for example I have a cube with a poly line inside of it. So I want to adjust the fill opacity of the cube so I can see the polyline.

Color attribute which is instance of Cesium.Color has an alpha channel.

2015/02/23 3:17、Sai Asuka asuka.shin@gmail.com のメッセージ:

Ya, check out the Sandcastle here

it makes 5 translucent boxes each with this code (line 129) alpha being the opacity

    position : Cesium.Cartesian3.fromDegrees(-106.0, 45.0, height),
    box : {
        dimensions : new Cesium.Cartesian3(10000.0, 90000.0, 90000.0),
        outline : true,
        outlineColor : Cesium.Color.WHITE,
        outlineWidth : 2,
        material : Cesium.Color.fromRandom({alpha : 0.5})


This example should tell you everything you want to know: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=GeoJSON%20and%20TopoJSON.html&label=Showcases

There are two ways to do it. You can configure the default stroke and fill for all features at load time; or you can modify the color of specific features after loading is done (the above example does both). As already mentioned, colors in Cesium have an alpha channel. There’s a lot of ways to specify a Color, so I would also check out the Color documentaiton: http://cesiumjs.org/Cesium/Build/Documentation/Color.html. “withAlpha” is probably the easiest if you want a known color name (Cesium.Color.RED.withAlpha(0.5)

Thank you, this is very clear.