geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
517 stars 405 forks source link

[Print plugin] Layers with visibility scale limits do not print if "useFixedScales" is true #8998

Closed catmorales closed 1 year ago

catmorales commented 1 year ago

Description

Layers with visibility scale limits do not print if "useFixedScales" is true Version : mapstore2georchestra : 2022.02.00-geOrchestra(f3ce6b9e) mapstore2 : 2022.02.xx(15c07932) Print plugin configuration:

{
  "cfg": {
    "useFixedScales": true,
    "mapPreviewOptions": {
      "enableScalebox": true
    },
    "outputFormatOptions": {
      "allowedFormats": [
        {
          "name": "PDF",
          "value": "pdf"
        },
        {
          "name": "PNG",
          "value": "png"
        }
      ]
    },
    "overlayLayersOptions": {
      "enabled": true
    },
    "overrideOptions": {
      "geodetic": true
    }
  },
  "override": {}
}

config.yaml configuration:

#==========================================================================
# Formats
# added for migration to 2022.02.00 version
#==========================================================================
formats:
  - '*'

#===========================================================================
# allowed DPIs
#===========================================================================
dpis:
  - 96
  - 150
  - 300

#===========================================================================
# the allowed scales
# catherine: ne pas mettre plus de 23 échelles
#===========================================================================
scales:
  - 100
  - 250
  - 500
  - 1000
  - 2000
  - 4000
  - 5000
  - 8000
  - 10000
  - 12000
  - 16000
  - 25000
  - 30000
  - 40000
  - 50000
  - 100000
  - 250000
  - 500000
  - 1000000
  - 2500000
  - 5000000
  ...

How to reproduce

Expected Result The layer must be printed when printing at a valid scale

Current Result The layer "Arbres d'ornement" don't print (not in the preview neither in the pdf)

image

Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users) | Browser Affected | Version | |---|---| |Internet Explorer| | |Edge| | |Chrome| | |Firefox| | |Safari| |

Other useful information

This need to be backported also to 2022.02.xx so that it will be possible to release 2022.02.02-geOrchestra including this

tdipisa commented 1 year ago

@catmorales there is a small bug to fix in how scales are handled. I've already provided feedback about this in https://github.com/georchestra/mapstore2-georchestra/issues/585 that I think is connected.

tdipisa commented 1 year ago

@ElenaGallo this still need to be tested on QA.