Synchronizing billboard with entity position


I have managed to synchronize a billboard with the current position of an entity of a datasource, which is a czml file. However, when zoomed in the billboard jitters. Although, the synchronization occurs every frame.
Here’s an example snippet how I did this:

viewer.scene.postRender.addEventListener(function () {
if (typeof viewer.trackedEntity === ‘object’) {
billboard.position = viewer.trackedEntity.position.getValue(viewer.clock.currentTime);


Is there a way to draw the synchronized billboard more smoothly, without putting it into the datasource’s entity?

Best regards,


Try listening to preRender instead of post render. Also, both pre/post render events pass in two parameters, scene and time. change your callback function signature to take them and use the time past in instead of viewer.clock.currentTime.

Is there a reason you are trying to manually map a billboard primitive to an entity.position instead of simple assigning a BillboardGraphics instance to the entity?