Skip to content

Commit

Permalink
[Backport release_3_7] Fix: allow tiled wms when singleTile is false …
Browse files Browse the repository at this point in the history
…and layer is not cached (#4814)

* Fix: allow tiled wms when singleTile is false and layer is not cached

* e2e: set quartiers as a single tile layer
  • Loading branch information
nboisteault authored Sep 30, 2024
1 parent 607b05f commit 7c8c33c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion assets/src/modules/BaseLayersMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,23 @@ export default class BaseLayersMap extends olMap {
(image.getImage()).src = src + '&ts=' + Date.now();
});
}
} else if (!node.layerConfig.singleTile) {
layer = new TileLayer({
minResolution: minResolution,
maxResolution: maxResolution,
source: new TileWMS({
url: useExternalAccess ? itemState.externalAccess.url : mainLizmap.serviceURL,
serverType: 'qgis',
params: {
LAYERS: useExternalAccess ? decodeURIComponent(itemState.externalAccess.layers) : node.wmsName,
FORMAT: useExternalAccess ? decodeURIComponent(itemState.externalAccess.format) : node.layerConfig.imageFormat,
STYLES: useExternalAccess ? decodeURIComponent(itemState.externalAccess.styles) : node.wmsSelectedStyleName,
DPI: 96,
TILED: 'true'
},
}),
});
}

}

layer.setVisible(node.visibility);
Expand Down
2 changes: 1 addition & 1 deletion tests/qgis-projects/tests/base_layers.qgs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"baseLayer": "False",
"displayInLegend": "True",
"group_visibility": [],
"singleTile": "False",
"singleTile": "True",
"imageFormat": "image/png; mode=8bit",
"cached": "False",
"clientCacheExpiration": 300
Expand Down

0 comments on commit 7c8c33c

Please sign in to comment.