Polygon not clamped to ground when changing material properties

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

While fiddling with a couple of GeoJSON files draped on the STK Terrain, I noticed that if I changed the material properties from a solid color to a striped one, the entity wouldn´t be “clamped to the ground” anymore, and thus, it would slide and mode whenever I moved the camera.

Testing this in the Sandcastle App (Ground Clamping), I noticed the same, but this time the polygons would disappear.

Did I miss something obvious in my code or is this feature working as expected/still not introduced?

Thanks a lot!

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

To the Cesium Sancastle App for Ground Clamping ( here ), add:

var PolyMaterial = new Cesium.StripeMaterialProperty({
evenColor: Cesium.Color.LIGHTBLUE.withAlpha(0.5),
oddColor: Cesium.Color.BLUE,
repeat: 50
});

Then, change the material property from the Polygon on line 86 from “Cesium.Color.BLUE.withAlpha(0.5)” to “PolyMaterial”

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

Mainly to visualize Areas of Interest differently

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

Cesium 1.38, Win7 64 bit, Firefox 52.1

Thanks again for your time!

Hi there,

Unfortunately GroundPrimitives do not yet support other materials. I’ve bumped this GitHub issue where we are tracking the feature. If you happen to have the bandwidth, contributions are welcome!

Thanks!

Gabby

We’ve just added support for materials on ground polygons, and the feature will be included in the upcoming Cesium 1.46 release available on June 1st.

Thanks!

-Hannah