mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
184 stars 417 forks source link

GeoJSON layer with opacity and point style defined are not rendered #3354

Open ismailsunni opened 1 month ago

ismailsunni commented 1 month ago

Context

Describe the bug

When the print spec has a GeoJSON layer that has opacity != 1 and has a point style defined, the whole layer is not rendered. When the opacity set to 1, it is rendered correctly. When the point style definition is removed, it is rendered correctly.

How to reproduce

  1. Visit https://ismailsunni.github.io/mfp-print-spec/ (A small tool to send print spec and get the result)
  2. Set the MFP server to https://geomapfish-demo-2-8.camptocamp.com/printproxy or press the "Set to Demo MFP" button
  3. I have uploaded six samples json spec here: https://github.com/ismailsunni/print-spec-examples/tree/main/geojson-opacity (use only the one without swisstopo in its name, 3 files)
  4. Copy the content of the json spec, and put in the tool above. Press "Print Spec" button. Wait.
  5. Compare the result of the PDF as shown below in the next section

The only difference between the three json is in line 42 (to set the layer opacity) and the point style definition (removed or not)

It can also be reproduced using Swisstopo Mapviewer MFP instance. Repeat those steps above, but now with "Set to Swiss Topo MFP" and use the json with swisstopo prefix.

Actual results

MFP Demo image

Swisstopo Mapviewer MFP instance image

Expected results

I expect that the geojson layer is rendered properly when the opacity is not 1 and with a point style defined.