How to put infobox/balloon over the selected entity and not in top right corner ?


I wonder if there is a way to automatically display infobox more like GE balloon style, over the selected entity.
I can't do it manually for all entities since I'm using KML file.



Hello Fabien,

Sorry, there is currently no support for this kind of behavior. We decided to make the infobox stay in a fix position because of Cesium's time dynamic capabilities. For an entity that is moving, it is difficult to read the info if the balloon is following it.
You could customize the infobox widget to get this kind of behavior. You could send the position of the selected entity to the widget every frame, then use SceneTransforms.wgs84ToWindowCoordinates to convert the entity position into the screen coordinates for positioning the balloon.
Alternatively, if you just wanted to change the fixed position of the infobox to elsewhere on the screen, you can override the CSS in the .cesium-infoBox class.

Best Regards,


Nice ! Thank you for the tip :wink: