3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
257 stars 143 forks source link

Vector layer substitution mechanism for faster browsing and perfect printing #2352

Open cxcandid opened 3 years ago

cxcandid commented 3 years ago

It would be very beneficial if we could have a layer replacement mechanism for vector layers like we already have for raster layers. The goal is to speed up browsing while getting perfect prints with contextual legends.

cxcandid commented 3 years ago

If layers could be replaced for printing, it would be possible to use MapProxy to speed up image display while browsing and print the original layers with contextual legends. Mapproxy's caching capabilities far exceed Lizmap's built-in caching mechanisms by now.

cxcandid commented 3 years ago

To be honest, I can see that the functionality is already there, but I have to add the WMS replacement url to the vector layer configuration in the project config file manually (the vector layer name and the WMS layer name must be the same!). This simplifies the problem to an adjustment of the QGIS lizmap-plugin. I'm really impressed by the speed increase, together with perfect print outs. As a positive side effect this also allows to generate different representations for display and printing.

"externalWmsToggle": "True",
"externalAccess": {
    "contextualWMSLegend": "0",
    "crs": "EPSG:3857",
    "dpiMode": "7",
    "featureCount": "10",
    "format": "image/png",
    "layers": "mylayer",
    "maxHeight": "512",
    "maxWidth": "512",
    "styles": "",
    "url": "http://<myserver>/mapproxy/<myservice>/service"
}
cxcandid commented 2 years ago

As a negative side effect popups won't work anymore. 🤔😕