Select to view content in your preferred language

Inconsistent scale during MapImageLayer export when using browser zoom in ArcGIS JavaScript SDK

260
1
11-22-2024 12:10 AM
mattheol
Emerging Contributor

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).

  • In Case 1, the layer will be displayed as expected.
  • In Case 2, the layer will not be displayed, despite the map scale being set to the same value.

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.

0 Kudos
1 Reply
mattheol
Emerging Contributor

Can somebody answer?

0 Kudos