From f9bc53b461828c64848c47eb49ebb5ecec45d069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Tue, 21 Jan 2025 13:45:56 +0100 Subject: [PATCH] PB 1358: Allow printing measures again Issue : Measures could not be printed anymore Cause : With the implementation, we had set the graphicYoffset to NaN instead of 0 when there is no offset, meaning the print service could not interpret it Fix : We ensure the graphicYoffset is set to 0 if non existent. --- src/api/print.api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/print.api.js b/src/api/print.api.js index 36c56e86d..39d18c213 100644 --- a/src/api/print.api.js +++ b/src/api/print.api.js @@ -135,8 +135,8 @@ class GeoAdminCustomizer extends BaseCustomizer { this.printResolution ) : 0 - // don't ask why it works, but that's the best I could do. - symbolizer.graphicYOffset = Math.round(1000 * symbolizer.graphicYOffset ?? 0) / 1000 + // if there is no graphicYOffset, we can't print points + symbolizer.graphicYOffset = Math.round(1000 * (symbolizer.graphicYOffset ?? 0)) / 1000 } if (size) { symbolizer.graphicWidth = adjustWidth(size[0] * scale, this.printResolution)