# Geojson layer style setting by colors based on a layer attribute

**URL:** <https://community.cesium.com/t/geojson-layer-style-setting-by-colors-based-on-a-layer-attribute/13950>\
**Category:** CesiumJS\
**Created:** [June 3, 2021, 11:35pm UTC](https://community.cesium.com/t/geojson-layer-style-setting-by-colors-based-on-a-layer-attribute/13950 "2021-06-03T23:35:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge.RA](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jorge.ra/32/3476_2.png) [@Jorge.RA](https://community.cesium.com/u/Jorge.RA)\
**Post date:** [June 3, 2021, 11:35pm UTC](https://community.cesium.com/t/geojson-layer-style-setting-by-colors-based-on-a-layer-attribute/13950/1 "2021-06-03T23:35:26Z")

</div>

I have a layer in geojson format, and I need to set the rendering style by color based on an attribute of the layer called type, but I am totally new to Cesium topic, can someone help me

This is the file

> **[Cesium Sandcastle](https://sandcastle.cesium.com/#c=pZJdb9owGIX/ipUrkDYHupWualqNwYaSElghtA2KVBnHNA6OndoOH5n23+cABVZ1V7uKXp/zHOc9iW2DnkRcgw5RtMi8MUAYE6WAFmAjCgmo4AApRbSK+M4DXcFhTOaoYLq9NQdiQTi4BpFFNl4y62E6pJ47Kd3mgLrK5aNz3HFb7iJ/vO94l9CYXuLewpjcM7/Eq2mw+BTSZhoG3zf94K70A18PH0ZJSBvNMJ1mw26yCLNpMk3btN/x8qkJG3Txyk/bys1YEpvZD8L1IMVng+Du3H9swHQwuWDo2+2k7zd/fhw+rJdP4x/kCQXU6+aNzuXsyxqVIu3HL35kXUU84kskwZKSFZFmE05W+0bg/fasFll4O3cE14hyIiOrfuByKTKqiAGPFY2IMv1hAudGbFcNunHt80Wr1WjVIw4A1AnhtXnBsa46rsm9vw5+VTIAkuhC8tfEHhGeEryLNBrvcplA8ZG6qqDf7ybHB+Zt9m5feDQoiOL4FPif2FKILBD/ShMmTq5MayeRREohD2lYcCVYtejzXtnz5mF9sBylN4zcVEdfaZYLqUEhWQ1CW5MsZ0gTZc8KvCAaYqUqyLFfESemS0Dj63e+KsDM/O9GmReMjWlJIuvGsY3/L6wqn/Ln4ZJIhjbGUr2GkzRv+jsBQujYZqwufctqIdgMyZPcPw)**
>
> The Cesium Sandcastle provides an interactive environment for testing Cesium code.

---

<div class="post-metadata">

**Author:** ![Eli](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/eli/32/4980_2.png) [@Eli](https://community.cesium.com/u/Eli)\
**Post date:** [June 8, 2021, 2:04am UTC](https://community.cesium.com/t/geojson-layer-style-setting-by-colors-based-on-a-layer-attribute/13950/2 "2021-06-08T02:04:46Z")

</div>

Hi @Jorge.RA - have you seen our [GeoJSON Sandcastle](https://sandcastle.cesium.com/?src=GeoJSON%20and%20TopoJSON.html&label=All)? It sounds like the “custom styling” option there is what you’re looking for.
