Open jusabatier opened 2 years ago
After some investigations, the generated PDF show the background, but the preview still show no background due to loading it in 3857 instead of the current used SRS.
I just have some returns from users as we deploy MS2 available for end users.
I appear that there are also problems with printing preview area and scale on our instance...
In summary :
I use this config for print plugin :
{
"cfg": {
"useFixedScales": true,
"mapPreviewOptions": {
"enableScalebox": true
},
"overrideOptions": {
"geodetic": true
}
},
"override": {}
}
And our mapstore is configured to use EPSG:2154.
Can I have some returns for these problems as they are critical, because they block the print function.
@tdipisa ?
@jusabatier it would be good if you can provide the following, so that we will do a check as soon as we can.
Here is a public context : https://geoportail.lepuyenvelay.fr/mapstore/#/context/Cadastre The used localConfig is this one : https://geoportail.lepuyenvelay.fr/mapstore/configs/localConfig.json And the defined context is this one : https://geoportail.lepuyenvelay.fr/mapstore/rest/geostore/misc/category/name/CONTEXT/resource/name/Cadastre
The use case :
Is it good for you ? Tell me if you need other infos.
Thank you @jusabatier we will try to do a quick check as soon as we can to get back to you.
But the preview isn't at this scale (it look to be a lot lower)
I think reproduce same wrong print preview with EPSG:32620
Added to localConfig
:
{
"code": "EPSG:32620",
"def": "+proj=utm +zone=20 +datum=WGS84 +units=m +no_defs +type=crs",
"extent": [166021.44, 0.0, 833978.56, 9329005.18],
"worldExtent": [-66.0, 0.0, -60.0, 84.0]
}
On our platform, Mapstore2 is configured with EPSG:2154
All of our backgrounds load tiles from EPSG:2154 grids, and it work well on the map.
But when we use the printing tool, the preview tool send request to get background in 3857 SRS. So, as our WMTS are not provided in other TileMatrix sets than EPSG:2154, it result in an error 400 :
And the backround layer is not show in the preview and in the printed pdf (blank).