# Polyline entities with arrow material property don't update color correctly

**URL:** <https://community.cesium.com/t/polyline-entities-with-arrow-material-property-dont-update-color-correctly/5835>\
**Category:** CesiumJS\
**Created:** [July 21, 2017, 11:13am UTC](https://community.cesium.com/t/polyline-entities-with-arrow-material-property-dont-update-color-correctly/5835 "2017-07-21T11:13:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhaskarr1205](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@bhaskarr1205](https://community.cesium.com/u/bhaskarr1205)\
**Post date:** [July 21, 2017, 11:13am UTC](https://community.cesium.com/t/polyline-entities-with-arrow-material-property-dont-update-color-correctly/5835/1 "2017-07-21T11:13:40Z")

</div>

Hi,  
I am using cesium 2.0, I tried to update polyline material with new property with PolylineArrowMaterialProperty. It's not updating color of the line.

var line1 = entities.add({  
&nbsp;&nbsp;&nbsp;&nbsp;polyline : {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;positions : Cesium.Cartesian3.fromDegreesArrayHeights([0, 0, 36000000, 38.8, 0.8, 40022479]),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width : 10,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;followSurface : false,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.BLUE)  
&nbsp;&nbsp;&nbsp;&nbsp;}  
});

var line2 = entities.add({  
&nbsp;&nbsp;&nbsp;&nbsp;polyline : {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;positions : Cesium.Cartesian3.fromDegreesArrayHeights([0, 0, 36000000, 36.5, -1.16, 42047591]),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width : 10,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;followSurface : false,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.BLUE)  
&nbsp;&nbsp;&nbsp;&nbsp;}  
});

viewer.zoomTo(line2, new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-120)));

Sandcastle.addToolbarButton('Change color to red', function() {  
&nbsp;&nbsp;&nbsp;&nbsp;line1.polyline.material = new Cesium.PolylineArrowMaterialProperty(Cesium.Color.RED);  
&nbsp;&nbsp;&nbsp;&nbsp;line2.polyline.material = new Cesium.PolylineArrowMaterialProperty(Cesium.Color.RED);  
});

I think there is a issue with PolylineArrowMaterialProperty API. I think PolylineArrowMaterialProperty act a singleton.

Please let me know how to change line color.

---

<div class="post-metadata">

**Author:** ![Rachel\_Hwang](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Rachel\_Hwang](https://community.cesium.com/u/Rachel_Hwang)\
**Post date:** [July 21, 2017, 5:34pm UTC](https://community.cesium.com/t/polyline-entities-with-arrow-material-property-dont-update-color-correctly/5835/2 "2017-07-21T17:34:56Z")

</div>

Hi there,

What do you mean by Cesium 2.0? Our current release is 1.35. Try updating to the latest version.

Your code works for me here: [http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=22f931a544a59de9f19449b80bac4824](http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=22f931a544a59de9f19449b80bac4824)

Hope that helps,

- Rachel
