How to adjust the scene size?

Basically I want to get rid of these black spaces on top and bottom of the map. I tried adjusting the camera but it didn’t work. Any ideas?



Thank you for your post! Based on what you have shared, my best guess is that the black spaces that you are seeing are an artifact from the HTML code that you have written. I would begin my investigation there.



I have the same problem loading cesium in a UWP WebView !!

Do you have any solution?

Best regards,


Welcome to the community! :grinning: :rocket:

Can you please share some more information on your issue? Some sample code or screenshots would great. I would also love to learn more about the overall strategy that you are implementing to fix this issue.


My HTML is pretty much empty.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        @import url(../node_modules/cesium/Build/Cesium/Widgets/widgets.css);
        html, body, #cesiumContainer {
            height: 100%; margin: 0; padding: 0; overflow: hidden;

    <script> if (typeof module === 'object') {window.module = module; module = undefined;} </script>  
    <script src=""></script>
    <script type="module" src="main3D.js"></script>
    <script>if (window.module) module = window.module;</script>
    <div id="cesiumContainer"></div>

There’s no way for us to run this code (it’s using locally loaded modules). If I were you, and to make sure you get get some help, make a Sandcsastle example of your issue. But also, to make it easier on you, wrap your div in another div with a style with a solid border of some color to see where the viewer stops and starts.

But also, what do you mean "get rid of it? Given the aspect ratio of the world map, what are you expecting there instead? Are you going for some weird projection, or do you expect the map to have the normal aspect ratio but all the way to the edges? This doesn’t make any sense, so please explain.