I have an OpenLayers map container defined as
#preview_cont {
width: 100%;
height: 15cm;
}
It looks OK on screen, but when I print it, the map is distorted. I assume it's because map container proportions are changed when printing. As far as I know, in such a case
ol.Map.updateSize()
has to be called. So I tried this function:
$(window).resize(function () {
map.updateSize();
});
Unfortunately, it's not called for printing. Is there a way, how to do it?