There is an issue related to scale inconsistency when exporting a map from a MapImageLayer while adjusting the browser zoom level.
Code Example:
See this CodePen example to reproduce the issue.
Case 1 (Browser Zoom 100%):
Map scale: 1:10000
Export map calculated scale: 10000.000000001572
Export map link: Export Map Case 1
Case 2 (Browser Zoom 90%):
Map scale: 1:10000
Export map calculated scale: 10005.539901150974
Export map link: Export Map Case 2
Expected Behavior:
The calculated scale during map export should remain consistent regardless of the browser zoom level. For a map scale set to 1:10000, the export should always reflect a scale of 10000.
Impact:
This issue creates inconsistencies in workflows that depend on precise scale values. For example, one of the MapServer layers is visible only at scales larger than 1:10001 (the minScale for this layer is set to 1:10001).
Technical Details:
The issue appears to be related to browser zoom affecting the resolution (DPI), which in turn impacts the bbox, size, and dpi parameters used in the export operation for the MapImageLayer.
Can somebody answer?