In this moment I'm reading the documentation about the InfoBox but doesn't appear nothing about modify the content. Do you have any idea?
Thanks!
entity.description = "Hello";
But I want insert in the description one value of the entity that is changing with the time (the height of extrusion of a polygon). I found the function getValue(time) but, I have no idea about where is declared the variable time in function. Any help?
In my opinion, the documentation of Cesium is very very well, but one example from each function would help all the doubts...
entity.description = '<script type="text/javascript">document.write("Hello ");</script>';
But it doesn't work. Someone know how put a script into the description? Thanks!
var iframe = document.getElementsByClassName('cesium-infoBox-iframe')[0];
iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts allow-popups allow-forms');
dots.forEach(function(dot) {
viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(dot.lon, dot.lat),
point : {
pixelSize : 7,
color : Cesium.Color.STEELBLUE,
outlineColor : Cesium.Color.BLACK,
outlineWidth : 1.0
}
});
});
viewer.selectedEntityChanged.addEventListener(function(entity) {
test_function();
});