Hello,
I am new to Cesium and I am trying to display a line which connects many lat/long positions (~22K) and I’m seeing the browser memory spike around 130 MB. My requirements call for as many as 25 of these lines being displayed at a time. Displaying several causes the memory to spike around 400 MB.
It appears to be a rendering problem since I’m seeing the same result whether I build the array of positions as the playback changes or if I only build it once and display them. My current implementation is using a polyline for each line. Here is a sample:
indent preformatted text by 4 spaces
this.polyline = new Cesium.Entity({
name: getName(),
polyline: {
material: new Cesium.ColorMaterialProperty( this.getColorCallback() ),
positions: new Cesium.CallbackProperty( function() {
return myArray;
}, false ),
show: new Cesium.CallbackProperty( function() {
return isVisible();
}, false ),
width: 2
}
});
indent preformatted text by 4 spaces
In the above, “myArray” has already had its lat/longs converted using “Cesium.Cartesian3.fromDegrees()”
The line displays accurately. My question is: Am I pushing the limits of Cesium with so many points or is my approach above a less than ideal way to accomplish my goal?
My hope is it’s the latter.
Thank you