# How to update properties of dataSource like alpha and saturation?

**URL:** <https://community.cesium.com/t/how-to-update-properties-of-datasource-like-alpha-and-saturation/8689>\
**Category:** CesiumJS\
**Created:** [September 19, 2019, 1:46pm UTC](https://community.cesium.com/t/how-to-update-properties-of-datasource-like-alpha-and-saturation/8689 "2019-09-19T13:46:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anne\_Flaherty](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@Anne\_Flaherty](https://community.cesium.com/u/Anne_Flaherty)\
**Post date:** [September 19, 2019, 1:46pm UTC](https://community.cesium.com/t/how-to-update-properties-of-datasource-like-alpha-and-saturation/8689/1 "2019-09-19T13:46:03Z")

</div>

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

I’d like to import multiple dataSources into Cesium from different KML files. Then allow the user to manipulate the appearance of each file’s data.

There are examples with imageryProviders, but not dataSources.

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

Import KML as in this sandcaslte example: [https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Export%20KML.html](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Export%20KML.html)

Then have a menu to manipulate the properties of the dataSource such as alpha and saturation-

> Examples with imagery:

- [https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Imagery%20Adjustment.html](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Imagery%20Adjustment.html)
- [https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Imagery%20Layers%20Manipulation.html](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Imagery%20Layers%20Manipulation.html)

---

<div class="post-metadata">

**Author:** ![Anne\_Flaherty](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@Anne\_Flaherty](https://community.cesium.com/u/Anne_Flaherty)\
**Post date:** [September 23, 2019, 12:06pm UTC](https://community.cesium.com/t/how-to-update-properties-of-datasource-like-alpha-and-saturation/8689/2 "2019-09-23T12:06:43Z")

</div>

Alternatively, is there a way to import / convert a dataSource to an imageryLayer to have properties that can be manipulated more directly?

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [September 23, 2019, 4:58pm UTC](https://community.cesium.com/t/how-to-update-properties-of-datasource-like-alpha-and-saturation/8689/3 "2019-09-23T16:58:35Z")

</div>

When you import a KML file in CesiumJS, it creates a set of entities representing the geometries in the file. You can access these entities and edit them as needed.

For example, you can see the “custom styling” example in this Sandcastle which will extrude and randomly color each polygon in the loaded data source:

[https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=GeoJSON%20and%20TopoJSON.html](https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=GeoJSON%20and%20TopoJSON.html)

---

<div class="post-metadata">

**Author:** ![mdc9001](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mdc9001/32/15919_2.png) [@mdc9001](https://community.cesium.com/u/mdc9001)\
**Post date:** [July 14, 2021, 6:00pm UTC](https://community.cesium.com/t/how-to-update-properties-of-datasource-like-alpha-and-saturation/8689/4 "2021-07-14T18:00:52Z")

</div>

I have a case where I want to set the the alpha value for **everything** represented by a `KmlDataSource`.

As far as I can tell neither `KmlDataSource` or `Entities` has an alpha value associated with it.

Any suggestions on how to update the alpha/transparency of an entire data source?
