question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cesium Full Screen makes entire page full screen, not cesium container

See original GitHub issue

I currently have cesium in a div about half the size of my page, and when I click full screen it makes the background black, the whole html page goes full screen, and cesium stays the same size.

could this be related to this issue?

-----UPDATE--------

could it be related to my css styles?

#cesiumContainer {
    width: 100%;
    height: 720px;
    margin: 0; padding: 0;
    overflow: hidden;
}

.map-container {
    height: 720px;
    box-shadow: 4px 4px 7px #d2d2d2;
}

and then having ViewEncapsulation.None?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
devondanpearcecommented, Feb 26, 2020

Experienced this. Turned out I’d not set the fullscreenElement on the viewer to the ID of my container. If you don’t set this, it defaults to document.body which full screens the whole page (see https://cesium.com/docs/cesiumjs-ref-doc/Viewer.html).

2reactions
bampakoacommented, Aug 13, 2018

@CHBaker can you try to alter the styles runtime, when clicking the fullscreen button? For example, if you set it as described in the README:

html, body, #cesiumContainer {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

it should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fullscreen - Cesium Documentation
Asynchronously requests the browser to enter fullscreen mode on the given element. If fullscreen mode is not supported by the browser, does nothing....
Read more >
Running a cesium viewer within a div - Google Groups
I'm just starting out with Cesium js. I can host the HelloWorld.html on local host and see the globe and stars. If I...
Read more >
angular - Make Cesium full screen - Stack Overflow
I am trying to access the fullscreen functionality with ol-cesium. It works but only in Chrome and Firefox, while in Safari it gives...
Read more >
Radioisotope Brief: Cesium-137 (Cs-137) - CDC
If the lead containers of Cs-137 are opened, the substance inside looks like a white powder and may glow. Cs-137 from nuclear accidents...
Read more >
Visualizing Data in a Web Browser with Cesium ion & FME
Learn how to bring data into Cesium ion with FME. Get tips for pre-processing data and turning it into robust 3D objects for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found