I included in an existing huge Angular 5/Ionic 3.9 app a map. Using Openlayers Version 5.0.2
I need to include fullscreen view as well.
In Firefox the fullscreen view works. In Chrome the switch to fullscreen works, but no map is loaded, as well the div for the map is not there.
I tried to set the source of FullScreen to a div with id/class fullscreen
<div id="fullscreen" class="fullscreen">
<div id="map" class="db-map"></div>
</div>
let fullscreenTarget = document.getElementById('fullscreen').parentElement;
controls: DefaultControls({
attribution: false
}).extend([new FullScreen({
source: fullscreenTarget
})]),
As well I tried several css modifications like this
.db-map{
#map {
margin: 5;
font-family: sans-serif;
height: 100%;
width: 100%;
-webkit-full-screen: 100%;
-moz-full-screen: 100%;
-ms-fullscreen: 100%;
}
}
.fullscreen {
height: 100%;
width: 100%;
}
.db-map.fullscreen {
height: 100%;
width: 100%;
}
While inspect the html page chrome shows that: Chrome fullscreen elements
Firefox shows that: Firefox fullscreen elements
But nothing works and I have no further idea what I could try.
Just a follow up for the problem above, that fullscreen was working in Firefox but not in Chrome. With a new version of Chrome the defect was fixed and now it is working.