Hi guys,
I’m trying to update the Polyline positions but I appear to be getting an “undefined is not a function”
var scene = viewer.scene;
var primitives = scene.primitives;
var polylines = new Cesium.PolylineCollection();
var points = [-100.0, 40.0,-90.0, 40.0];
// Apply a polyline glow material
var coloredPolyline = polylines.add({
positions : Cesium.Cartesian3.fromDegreesArray(points),
material : Cesium.Material.fromType(Cesium.Material.PolylineGlowType, {
innerWidth : 3.0,
color : new Cesium.Color(1.0, 0.5, 0.0, 1.0)
}),
width : 10.0
});
primitives.add(polylines);
points.push(-101.0, 41.0);
coloredPolyline.setPositions(Cesium.Cartesian3.fromDegreesArray(points));
when I call coloredPolyline.setPositions().
Can anyone please show me how a valid version of the above? coloredPolyline is registering as an object, but somehow the setPositions is not registering as an available function. I have also tried the get() function as outlined in http://www.personal.psu.edu/users/k/y/kyn5050/Documentation/PolylineCollection.html#get however I get similar results.
“Uncaught TypeError: undefined is not a function”