# Adding positions to a polyline updates the line, but not if I take one out

**URL:** <https://community.cesium.com/t/adding-positions-to-a-polyline-updates-the-line-but-not-if-i-take-one-out/9029>\
**Category:** CesiumJS\
**Created:** [January 25, 2020, 11:53am UTC](https://community.cesium.com/t/adding-positions-to-a-polyline-updates-the-line-but-not-if-i-take-one-out/9029 "2020-01-25T11:53:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Johannesen](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/alexander_johannesen/32/2008_2.png) [@Alexander\_Johannesen](https://community.cesium.com/u/Alexander_Johannesen)\
**Post date:** [January 25, 2020, 11:53am UTC](https://community.cesium.com/t/adding-positions-to-a-polyline-updates-the-line-but-not-if-i-take-one-out/9029/1 "2020-01-25T11:53:08Z")

</div>

Have an odd problem where I set the .positions property of a polyline with an array of points. I use the exact same methods for creating and managing the data, the only difference is that the array of positions itself either has a point added or taken out. When I set the property the entity updates with the new added point, but if a point was delete nothing happens until I redraw the line in some other way. Any obvious reasons for this before I chase this further, some caching mechanism or, uh, something?

If it’s not obvious I’ll try to replicate the problem in a sandcastle. I’m using latest Cesium, latest Chrome.

Cheers,

Alex

---

<div class="post-metadata">

**Author:** ![Alexander\_Johannesen](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/alexander_johannesen/32/2008_2.png) [@Alexander\_Johannesen](https://community.cesium.com/u/Alexander_Johannesen)\
**Post date:** [February 4, 2020, 1:25am UTC](https://community.cesium.com/t/adding-positions-to-a-polyline-updates-the-line-but-not-if-i-take-one-out/9029/2 "2020-02-04T01:25:54Z")

</div>

Hiya,

Follow up on this issue. I don’t know why this happens, maybe it’s a bug, but I’ve hacked around it by turning ‘show’ to false, do the update to positions, and then do ‘show’ = true, and that seems to do it. Not ideal, but seems to work for now.

Cheers,

Alex
