Hello, I’m trying to add descriptions to entities, but in doing so am shown only an empty slot where the description should be. The name and all other attributes display just fine, but the description does not. Below is the code I’m using to add the points:
var viewer = new Cesium.Viewer("cesiumContainer");
viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
description: 'test description',
point: {
pixelSize: 10,
color: Cesium.Color.YELLOW,
},
});
I suspect it has to do with the console error, but can’t be sure:
Uncaught TypeError: Cannot read properties of null (reading ‘createElement’)
at HTMLIFrameElement. (Cesium.js:90)
I have tried both Edge and Chrome for viewing the html in browser and encountered the issue in both. Additionally, I put this code snippet in Sandcastle with no issues - so ‘test description’ displays there.
How can I remedy this so I can get descriptions working from my html file? Thank you.
Thank you for your question and welcome to the community!
I suspect the issue here is with your HTML file. Can you please share some more details about what div object you are including in your local HTML file? For instance, in the sandcastle example that you shared with me, the following div objects are included:
Is there something I need to add provided by Sandcastle and not under the cesiumjs library? As I said, the infobox does display, but it has an empty block of space where the description should be.