#10839: Allow printing by freely setting the scale factor#11130
#10839: Allow printing by freely setting the scale factor#11130offtherailz merged 4 commits intogeosolutions-it:masterfrom
Conversation
- allow to configure 'disableScaleLocking' for print plugin to enable disable scales lock in print to be compatable with print service - handle editing DD for scales - handle sending the actual scale of map in case disableScaleLocking = true - add translations
|
After a sync meeting with @offtherailz it is requested some changes to the implementation which is:
1- add a new property named editScale = true by default (as well as useFixedScales is = false, that implies that by default disableScaleLocking=true. the 2nd point is added to issue description itself |
- add editScale to be for Print cfg - edit translation - add jsdocs
offtherailz
left a comment
There was a problem hiding this comment.
Here the functionality. To summarize also for @tdipisa .
Video.del.2025-06-16.14-18-18.mp4
I prepared this setup:
http://localhost:8081/#/context/test_10839_fractional_zoom
With the following config of the printing tool to test
{
"cfg": {
"geodetic": true,
"editScale": true,
"useFixedScales": false,
"mapPreviewOptions": {
"enableScalebox": true
}
},
"override": {}
}
Bugs of this PR:
- Clearable ("x" at the end of the input box) should not be there. It clears
- The zoom slider control can be helpful, but it snaps of existing (or new inserted by thsi PR) scale values, so not useful for the specific application, but in general it can help the user to adapt the zoom. So we can do 2 things with this scale bar, I ask about this to take a decision to @tdipisa :
- Make it always available (it doesn't regards only the case of editable scale, in fact)
- Remove it (if not part of the PR).
Pre-existing bugs
I noticed that, setting up A4 rather then A2 the scale and the bbox remains the same. This looks incorrect, because in fact the ratio is double for A2, A3, A4. When printed the image effectively changes.
Video.del.2025-06-16.13-06-01.mp4
This is pre-existing issue, replicated here on dev
Video.del.2025-06-16.14-28-49.mp4
Video.del.2025-06-16.14-28-49.mp4
|
@offtherailz thank you so much. |
- remove clear icon from scalebox list - remove zoom slider control from print
I have tried to reproduced it locally and it doesn't print.mp4 |
There was a problem hiding this comment.
Parameters are sent consistently and everything looks working.
From my test:
- in a cotnext properly configured With no fixed scales and geodedic: true.
- added a measure of a street 53 as annotation
- added scale 1000
- printed in A4
Everything looks consistent: 👍
(no ruler, so no precise measures, sorry 😄 )
|
@ElenaGallo, could you please test this on DEV ? Thank you |
|
When backport, @mahmoudadel54 do not forget to backport also this one: |
|
Test passed, @mahmoudadel54 please backport to 2025.01.xx. Thanks |
…tor (geosolutions-it#11130) * - creating ZoomSliderComp - allow to configure 'disableScaleLocking' for print plugin to enable disable scales lock in print to be compatable with print service - handle editing DD for scales - handle sending the actual scale of map in case disableScaleLocking = true - add translations * - fix FE failure tests via edit unit test in actions/print * - handle saving/update resolution for editScale - add editScale to be for Print cfg - edit translation - add jsdocs * resolve review comments: - remove clear icon from scalebox list - remove zoom slider control from print
Backport is done --> #11247 |
I think it was better to wait for merge backport PR for #11236 first as now the backport PR for #10839 is red @offtherailz |
* fix_icon: fix FE unit tests failure due to change in PR 11236 (geosolutions-it#11245) geosolutions-it#10839: Allow printing by freely setting the scale factor (geosolutions-it#11130) Annotation/Measurement not shown in the legend of the printred map geosolutions-it#11235 (geosolutions-it#11236)


This PR handles allowing printing by freely setting using zoom slider or entering a value in DD of scales if a cfg 'disableScaleLocking' for Print plugin equals true and compatable with print service in config.yml file.
This PR includes:
Description
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
#10839
What is the new behavior?
User can print with be set freely using zoom slider or entering a value in DD of scales
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information