Skip to content

Annotation/Measurement not shown in the legend of the printred map #11235#11236

Merged
offtherailz merged 6 commits intogeosolutions-it:masterfrom
rowheat02:printenginevector
Jun 25, 2025
Merged

Annotation/Measurement not shown in the legend of the printred map #11235#11236
offtherailz merged 6 commits intogeosolutions-it:masterfrom
rowheat02:printenginevector

Conversation

@rowheat02
Copy link
Copy Markdown
Contributor

@rowheat02 rowheat02 commented Jun 23, 2025

Description

The print export of the map with vector layers was missing the legend of vector layers(annotation, measurement). This PR includes the legends of vector layers on print export.

Please check if the PR fulfills these requirements

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

  • Enhancement

fixes #11235

What is the current behavior?

#11235
Annotations and measurements (vector layers) are not shown in the legend on the exported print

What is the new behavior?

Annotations and measurements(vector layers) should be shown in the legend on the exported print
image

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

@rowheat02 rowheat02 self-assigned this Jun 23, 2025
@rowheat02 rowheat02 marked this pull request as ready for review June 23, 2025 12:07
@tdipisa tdipisa requested a review from offtherailz June 23, 2025 12:15
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to test when using promises.
POlease also fix object-assign usage.

@rowheat02 rowheat02 force-pushed the printenginevector branch from f3d6783 to e16bfc2 Compare June 23, 2025 14:02
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result looked good

image

Anyway at a certain point I started having these errors:

  • I started having results and it was quite good, but at a certain time, I had this error.
Error inlining remote css file SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
    at eval (embed-webfonts.js:91:70)
    at Array.forEach (<anonymous>)
    at getCSSRules (embed-webfonts.js:88:17)
    at parseWebFontRules (embed-webfonts.js:160:28)
    at getWebFontCSS (embed-webfonts.js:164:25)
    at embedWebFonts (embed-webfonts.js:176:21)
    at toSvg (index.js:24:73)
    at async toCanvas (index.js:32:17)
    at async Object.toPng (index.js:60:20)
    at async Promise.all (:8081/index 1)

Here the video:

Video.del.2025-06-24.09-48-25.mp4
Video.del.2025-06-24.09-56-00.mp4

after a lot of seconds, I receive also this error by the server, but this is probably due to the first error, I report it only for completeness:

@rowheat02 rowheat02 requested a review from offtherailz June 24, 2025 09:43
@offtherailz offtherailz enabled auto-merge (squash) June 25, 2025 14:52
@offtherailz offtherailz merged commit 453249d into geosolutions-it:master Jun 25, 2025
6 checks passed
@offtherailz offtherailz added this to the 2025.01.00 milestone Jun 26, 2025
@ElenaGallo
Copy link
Copy Markdown
Contributor

Test passed, @rowheat02 please backport to 2025.01.xx. Thanks

dsuren1 added a commit to dsuren1/MapStore2 that referenced this pull request Jun 27, 2025
* 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)
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.

Annotation/Measurement not shown in the legend of the printed map

3 participants