georchestra / mapstore2-georchestra

geOrchestra newest viewer
Other
6 stars 23 forks source link

[Annotations] Disabled annotations are printed #646

Closed catmorales closed 7 months ago

catmorales commented 12 months ago

Describe the bug If several annotations exist in the "Annotations" layer, the annotations whose visibility is disabled are still printed and visible in the PDF generated by MapfishPrint.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots print_disabled _annotation json file :

{
    "features": [{
            "type": "FeatureCollection",
            "properties": {
                "id": "4e140700-402f-11ee-a6e0-670ce0e57c93",
                "title": "visible",
                "visibility": true
            },
            "features": [{
                    "type": "Feature",
                    "geometry": {
                        "coordinates": [[[-1.7510546105248588, 48.00719092864499], [-1.7504260476146425, 48.00491186587863], [-1.748844502227647, 48.00504752719536], [-1.7497974847044264, 48.00725875635083], [-1.7510546105248588, 48.00719092864499]]],
                        "type": "Polygon"
                    },
                    "properties": {
                        "id": "4fe54490-402f-11ee-a6e0-670ce0e57c93",
                        "isValidFeature": true,
                        "canEdit": false
                    },
                    "style": [{
                            "color": "#ffcc33",
                            "opacity": 1,
                            "weight": 3,
                            "fillColor": "#7ed321",
                            "fillOpacity": 1,
                            "editing": {
                                "fill": 1
                            },
                            "highlight": false,
                            "id": "4fe4cf60-402f-11ee-a6e0-670ce0e57c93"
                        }
                    ]
                }
            ],
            "style": {
                "highlight": false
            }
        }, {
            "type": "FeatureCollection",
            "properties": {
                "id": "667617c0-402f-11ee-a6e0-670ce0e57c93",
                "title": "invisible",
                "visibility": false
            },
            "features": [{
                    "type": "Feature",
                    "geometry": {
                        "coordinates": [[[-1.7491486455713, 48.00725875635083], [-1.74813483442579, 48.005128923814134], [-1.7467966037137166, 48.005305282714154], [-1.7481753868716103, 48.007367280494634], [-1.7491486455713, 48.00725875635083]]],
                        "type": "Polygon"
                    },
                    "properties": {
                        "id": "67e49be0-402f-11ee-a6e0-670ce0e57c93",
                        "isValidFeature": true,
                        "canEdit": false
                    },
                    "style": [{
                            "color": "#ffcc33",
                            "opacity": 1,
                            "weight": 3,
                            "fillColor": "#d0021b",
                            "fillOpacity": 1,
                            "editing": {
                                "fill": 1
                            },
                            "highlight": false,
                            "id": "67e44dc0-402f-11ee-a6e0-670ce0e57c93"
                        }
                    ]
                }
            ],
            "style": {
                "highlight": false
            }
        }
    ],
    "type": "ms2-annotations"
}

Desktop (please complete the following information): tested on https://portail-test.sig.rennesmetropole.fr Firefox 102.14.0esr (32 bits) image

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

dsuren1 commented 8 months ago

Fix is required only on MS 2023.02.xx

dsuren1 commented 8 months ago

Upstream issue