works fine. But my problem is, that I need different background color depending on the infobox content. So I would like to set the background color together with the html content of the infobox.
The infoBox has an iframe in it.
The iframe css is controlled by /Widgets/InfoBox/InfoBoxDescription.css
To override iframe contents, you will either need to add lines to this css file or create your own infobox, which I am now trying to do. Until then, I simply added this to the bottom of the infoBoxDescription.css file:
.cesium-infoBox-description, body, html { color: #000000; background-color: #FFF; }
I’ve discovered a solution which applies to my app, where I am creating entities from a geojson dataset.
As I iterate over the entities created from my dataset, I am dynamically populating the description property and wrapping those values with a div which has style explicitly set.
var dataSource = Cesium.GeoJsonDataSource.load(’…/data/quartier2.json’).then(function(data) {
viewer.dataSources.add(data);
var entities = data.entities.values;
for (var i = 0; i < entities.length; i++)
var entity = entities[i];
if (entity.properties.hasOwnProperty(“description”)) {