From 2d0cc67e1381e6856efd0bc5525e4281cf5750cc Mon Sep 17 00:00:00 2001 From: Renaud Michaelis Date: Wed, 26 Jun 2024 14:10:51 +0200 Subject: [PATCH] Print complex styles --- geoportal/jsapi/src/printmanager.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geoportal/jsapi/src/printmanager.js b/geoportal/jsapi/src/printmanager.js index 6270ccdf0..f40881f76 100644 --- a/geoportal/jsapi/src/printmanager.js +++ b/geoportal/jsapi/src/printmanager.js @@ -282,7 +282,7 @@ encodeLayer(arr, layer, resolution) { this.encodeImageLayer_(arr, layer); } else if (layer instanceof TileLayer) { this.encodeTileLayer_(arr, layer); - } else if (layer instanceof VectorLayer) { + } else if (layer instanceof VectorLayer || layer instanceof ol.layer.Vector) { this.encodeVectorLayer_(arr, layer, resolution); } } @@ -614,6 +614,7 @@ encodeVectorStyle_(object, geometryType, style, styleId, featureStyleProp) { this.encodeVectorStylePoint_(styleObject.symbolizers, imageStyle); } } + if (textStyle !== null) { this.encodeTextStyle_(styleObject.symbolizers, textStyle); } @@ -676,7 +677,7 @@ encodeVectorStyleLine_(symbolizers, strokeStyle) { */ encodeVectorStylePoint_(symbolizers, imageStyle) { var symbolizer; - if (imageStyle instanceof CircleStyle) { + if (imageStyle instanceof CircleStyle || imageStyle instanceof ol.style.Circle) { symbolizer = /** @type {MapFishPrintSymbolizerPoint} */ ({ type: 'point' });