geoadmin / web-mapviewer

The viewer application for maps and geodata
https://map.geo.admin.ch
Other
57 stars 9 forks source link

PB-818: Ensuring scales are respected on print - #minor #1015

Closed ltkum closed 2 days ago

ltkum commented 1 month ago

Issue : When we were sending print requests, the scales of the symbols and texts in kmls were off. For icons, they were too small, and the texts were too big.

Fix : We corrected the scales for icons and labels. Icons used a DPI adaptation of 90 / 254 which was inherited from the old mapviewer. After some empirical testing, it looks like on the new mapviewer needs a 150 / 254 DPI adaptation Labels were not using the 'scale' parameter for the fonts at all, and they now also use a 150 / 254 DPI adaptation.

It is important to note that the '254' given here is a computed value, as some layers will have smaller resolutions and their DPI will be used in those situations

While testing, try to test with different screens, to ensure the result is consistent at all times.

Test link

cypress[bot] commented 1 month ago

web-mapviewer    Run #3283

Run Properties:  status check passed Passed #3283  •  git commit f4e125cf46: PB-818: adapt unit tests
Project web-mapviewer
Branch Review bugfix-PB-818-font-and-image-size-dont-match-in-print
Run status status check passed Passed #3283
Run duration 04m 52s
Commit git commit f4e125cf46: PB-818: adapt unit tests
Committer Martin Künzi
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 21
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 210
View all changes introduced in this branch ↗︎