Request Render Mode - Unable to force render.

I am trying to get the new Request Render mode working, and having trouble with it.

We have an application that uses the Cesium map to display sets of bar charts by zip code. We mostly have static data, with one significant exception -- when zooming in and out, we change the scale of these bar charts.

We have, therefore, added an event listener to camera.moveEnd to run updates on our entities. The minimal code example here is listed below:

$this.viewer.camera.moveEnd.addEventListener(function () {
    $this._RunUpdates();

    $this.viewer.scene.requestRender();
});

In RunUpdates(), we go to the entities defined here, and individually set a new entity.box.dimensions and entity.position for each.

Our issue is that when we are zooming, sometimes Cesium doesn't actually trigger this requested rendering -- the bar charts remain at the old size. This is fixed when the next update happens, although sometimes this will remain lagging (such that if you zoom, then zoom again, it will either show it hitting the previous size, or show two seperate frame refreshes, one for size b, and then one for size c.)

This is all happening on Cesium 1.43 on Chrome 64.0.3282.186, on Windows 10.0.15063. Any assistance would be appreciated.

1 Like

Hi there,

A new render is always requested if the camera moves regardless, so you shouldn’t need to specify it explicitly in your camera.moveEnd listener. Is RunUpdates asynchronous? If so, you would want to request after the updates are complete. If not, what kind of updates are you doing? It might require multiple request renders if the primitives need several frames to update.

Thanks,

Gabby

Hi Darrel - did you solve the problem - I have a similar behaviour !

Rüdiger

1 Like

@Darrel