Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#10831: Improve how printing map preview is managed #10866

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahmoudadel54
Copy link
Contributor

Description

This PR includes:

  • handling printing map preview is no longer synchronized with the viewer's map
  • handling printing map preview can be moved and zoomed independently using the mouse wheel and/or the scale selector, if present
  • enable the user to click on print, the final print will in fact use the center and scale (properly converted) on the map preview, with the result of printing the same viewport (the image may change in resolution because of the DPI selector)
  • handling sync button in the preview map just for manually synching the preview with the viewer's map remain available as is (if configured)

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe: enhancement

Issue

What is the current behavior?
#10831

What is the new behavior?

  • The printing map preview is no longer synchronized with the viewer's map
  • The printing map preview can be moved and zoomed independently using the mouse wheel and/or the scale selector, if present.
  • When the user clicks on print, the final print will in fact use the center and scale (properly converted) on the map preview, with the result of printing the same viewport (the image may change in resolution because of the DPI selector).
  • The sync button in the preview map for manually synching the preview with the viewer's map remain available as is (if configured)
2025-02-26.00-09-59.mp4

This demo assumes setting cfg for print plugin: mapPreviewOptions: { enableScalebox: true, enableRefresh: true}

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

Description:
- handling printing map preview is no longer synchronized with the viewer's map
- handling printing map preview can be moved and zoomed independently using the mouse wheel and/or the scale selector, if present
- enable the user to click on print, the final print will in fact use the center and scale (properly converted) on the map preview, with the result of printing the same viewport (the image may change in resolution because of the DPI selector)
- handling sync button in the preview map just for manually synching the preview with the viewer's map remain available as is (if configured)
- add unit test
@mahmoudadel54 mahmoudadel54 added this to the 2025.01.00 milestone Feb 25, 2025
@mahmoudadel54 mahmoudadel54 self-assigned this Feb 25, 2025
@mahmoudadel54 mahmoudadel54 linked an issue Feb 25, 2025 that may be closed by this pull request
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve how printing map preview is managed
1 participant