# How to use the image map below as the material after setting the extradedHeight for polygons

**URL:** <https://community.cesium.com/t/how-to-use-the-image-map-below-as-the-material-after-setting-the-extradedheight-for-polygons/34424>\
**Category:** CesiumJS\
**Created:** [August 9, 2024, 1:11am UTC](https://community.cesium.com/t/how-to-use-the-image-map-below-as-the-material-after-setting-the-extradedheight-for-polygons/34424 "2024-08-09T01:11:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalidaliW](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dalidaliw/32/14624_2.png) [@dalidaliW](https://community.cesium.com/u/dalidaliW)\
**Post date:** [August 9, 2024, 1:11am UTC](https://community.cesium.com/t/how-to-use-the-image-map-below-as-the-material-after-setting-the-extradedheight-for-polygons/34424/1 "2024-08-09T01:11:17Z")

</div>

![image](https://global.discourse-cdn.com/cesium/original/3X/b/3/b3acef87b5b4cc2fbef5408fd0b5d5111b07abd4.png)

---

<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:** [August 13, 2024, 12:55pm UTC](https://community.cesium.com/t/how-to-use-the-image-map-below-as-the-material-after-setting-the-extradedheight-for-polygons/34424/2 "2024-08-13T12:55:24Z")

</div>

Hi @dalidaliW,

It should be possible to add a texture to an extruded polygon as follows, as shown in [this Sandcastle example](https://sandcastle.cesium.com/?src=Polygon.html).

```js
const texturedPolygon = viewer.entities.add({
  name:
    "Extruded textured polygon with per-position heights and custom texture coordinates",
  polygon: {
    hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights([
      -118.4,
      40.4,
      50000,
      -118.4,
      37,
      30000,
      -114.2,
      38.0,
      35000,
      -108.0,
      37,
      30000,
      -108.0,
      40.4,
      50000,
    ]),
    textureCoordinates: {
      positions: [
        new Cesium.Cartesian2(0, 1),
        new Cesium.Cartesian2(0, 0),
        new Cesium.Cartesian2(0.5, 0),
        new Cesium.Cartesian2(1, 0),
        new Cesium.Cartesian2(1, 1),
      ],
    },
    perPositionHeight: true,
    extrudedHeight: 1000,
    material: "../images/Cesium_Logo_Color.jpg",
  },
});

```
