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

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({
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArrayHeights([0, 0, 36000000, 38.8, 0.8, 40022479]),
        width : 10,
        followSurface : false,
        material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.BLUE)
    }
});

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

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

Sandcastle.addToolbarButton('Change color to red', function() {
    line1.polyline.material = new Cesium.PolylineArrowMaterialProperty(Cesium.Color.RED);
    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.

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

Hope that helps,

  • Rachel