# Polygon not clamped to ground when changing material properties

**URL:** https://community.cesium.com/t/polygon-not-clamped-to-ground-when-changing-material-properties/6221
**Category:** CesiumJS
**Created:** [November 6, 2017, 2:08pm UTC](https://community.cesium.com/t/polygon-not-clamped-to-ground-when-changing-material-properties/6221 "2017-11-06T14:08:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Evil\_Happy\_Hippo](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Evil\_Happy\_Hippo](https://community.cesium.com/u/Evil_Happy_Hippo)
#### Post date: [November 6, 2017, 2:08pm UTC](https://community.cesium.com/t/polygon-not-clamped-to-ground-when-changing-material-properties/6221/1 "2017-11-06T14:08:40Z")

</div>

**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](https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Ground%20Clamping.html&label=All) ), 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!

---

<div class="post-metadata">

### Author: ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)
#### Post date: [November 8, 2017, 9:33pm UTC](https://community.cesium.com/t/polygon-not-clamped-to-ground-when-changing-material-properties/6221/2 "2017-11-08T21:33:17Z")

</div>

Hi there,

Unfortunately GroundPrimitives do not yet support other materials. I’ve [bumped this GitHub issue](https://github.com/AnalyticalGraphicsInc/cesium/issues/5025) where we are tracking the feature. If you happen to have the bandwidth, [contributions are welcome](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CONTRIBUTING.md)!

Thanks!

Gabby

---

<div class="post-metadata">

### Author: ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)
#### Post date: [May 15, 2018, 7:03pm UTC](https://community.cesium.com/t/polygon-not-clamped-to-ground-when-changing-material-properties/6221/3 "2018-05-15T19:03:33Z")

</div>

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
