CallbackProperty for PolyLineGraphic positions is very slow when PolyLineGraphic is clampedToGround

1. A concise explanation of the problem you’re experiencing.

When using a callback property for positions on a PolyLineGraphic, framerate drops to 0 if PolyLineGraphic is clamped to ground.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Here is a demo on Sandcastle

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I need to use the callback to dynamically update a billboard and the polylines associated with it on the same render (they need to move in-sync and this doesn’t work if I update the positions statically…the billboard moves and then the lines move on a later render frame). I also need to do this with elevation data and the lines are clamped to ground.

4. The Cesium version you’re using, your operating system and browser.


1.52 (and before)


Windows 10


Chrome Version 70.0.3538.110 (Official Build) (64-bit)

Firefox 64.0 (64-bit)

I think the problem is that a polyline that’s clamped to ground needs to sample points along its length (how many depends on the granularity setting) and then it uploads all those new vertices to the GPU (which I think is where the bottleneck actually is).

I’m not sure off the top of my head what an easy way to make this faster would be unfortunately.