I am in a need to print and share the HTML division where my cesium map loads. I used the simple cesium app creating tutorials and some JavaScript codes in order to enable the facility. Currently I am able to print the entire screen but my code is unable to get the contents of the division where the cesium map loads. You can find the screenshot below:
This happens because by the time you’re taking the screenshot, the WebGL drawing buffer has already been swapped out. This happens for performance reasons, you can read more about it here:
To force it to keep the buffer until the next redraw, pass the preserveDrawingBuffer option to the viewer as shown below:
var viewer = new Cesium.Viewer(‘cesiumContainer’, {