Currently, I am in the process of customizing a Cesium map that includes an overlay containing various information. The style of this overlay is being implemented using Bootstrap. However, I have encountered an issue where the divs I add to the overlay remain fixed in position and do not adjust according to the page resizing. Is there any way to make these DIV elements added to the Cesium viewer responsive?
This is what I have attempted so far:
var position = Cesium.Cartesian3.fromDegrees(-76.59777, 39.03883);
var scratch = new Cesium.Cartesian2();
var canvasPosition = viewer.scene.cartesianToCanvasCoordinates(position, scratch);
viewer.scene.preRender.addEventListener(function () {
if (Cesium.defined(canvasPosition)) {
htmlOverlayBoxInfo.style.left = '600px';
htmlOverlayBoxInfo.style.top = '180px';
}
});
<div id="box-info" style="position: absolute" class="circles push-50 visibility">
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn">
<span class="circle circle-0"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="100">
<span class="circle circle-1"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="200">
<span class="circle circle-2"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="300">
<span class="circle circle-3"></span>
</div>
<div class="visibility-hidden " data-toggle="appear" data-class="animated fadeIn" data-timeout="400">
<span class="circle circle-4"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="500">
<span class="circle circle-5"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="600">
<span class="circle circle-6"></span>
</div>
<span class="circle circles-main-content visibility-hidden" data-toggle="appear"
data-class="animated fadeIn" data-timeout="100">
<h4>
New </h4>
</span>
</div>
To ensure that the required overlay appears correctly on the map, I have been forced to include [style="position: absolute"]. What could possibly be causing this issue? Any insights or solutions would be greatly appreciated.