Fixes #9460 and #9665 Replace calculateExtent and fit with getResolution and setResolution as the former do not produce the desired result when the view is rotated. Export the viewport instead of the map div (which doesn't resize) and specify the width and height in the export options This is a minimal fix for the two issues. Further enhancement including a fallback to export layer canvases where the browser doesn't support html-to-image could be done separately if necessary.
2.5 KiB
2.5 KiB