# 3D Polygon in czml

**URL:** <https://community.cesium.com/t/3d-polygon-in-czml/983>\
**Category:** CesiumJS\
**Created:** [February 7, 2014, 11:00am UTC](https://community.cesium.com/t/3d-polygon-in-czml/983 "2014-02-07T11:00:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepien.a.karol](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@stepien.a.karol](https://community.cesium.com/u/stepien.a.karol)\
**Post date:** [February 7, 2014, 11:00am UTC](https://community.cesium.com/t/3d-polygon-in-czml/983/1 "2014-02-07T11:00:26Z")

</div>

Hello,

Lets say I have given object(for example 3d building) in czml:  
{  
&nbsp;&nbsp;&nbsp;&nbsp;"id":"somename",  
&nbsp;&nbsp;&nbsp;&nbsp;"availability":"2008-01-01T23:00:00Z/2008-01-02T23:00:00Z",  
&nbsp;&nbsp;&nbsp;&nbsp;"vertexPositions":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"cartographicDegrees":[  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...positions(with nonzero-z)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]  
&nbsp;&nbsp;&nbsp;&nbsp;},  
&nbsp;&nbsp;&nbsp;&nbsp;"polyline":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"color":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"rgba":[  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;255,0,0,255  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"outlineWidth":0.0,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"width":1.0,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"show":true  
&nbsp;&nbsp;&nbsp;&nbsp;},  
&nbsp;&nbsp;&nbsp;&nbsp;"polygon":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"show":true,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"material":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"solidColor":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"color":{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"rgba":[  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;255,255,0,255  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;}

But the effect I get is that only polylines get proper height, polygon seems to be glued to the surface, its totally flat. Is there a way to write in czml 3d object?

Best regards.

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [February 13, 2014, 2:16pm UTC](https://community.cesium.com/t/3d-polygon-in-czml/983/2 "2014-02-13T14:16:15Z")

</div>

This feature should be in the next release; which is currently scheduled for March 3rd.

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [March 6, 2014, 2:27pm UTC](https://community.cesium.com/t/3d-polygon-in-czml/983/3 "2014-03-06T14:27:34Z")

</div>

The feature is in b26, you need to update your CZML to take advantage of it. See [https://github.com/AnalyticalGraphicsInc/cesium/wiki/CZML-Content#wiki-polygon](https://github.com/AnalyticalGraphicsInc/cesium/wiki/CZML-Content#wiki-polygon)
