Skip to content

Commit

Permalink
Only add external layer print params for background layer printLayer …
Browse files Browse the repository at this point in the history
…defined via resource string if printExternalLayers=true
  • Loading branch information
manisandro committed Nov 27, 2024
1 parent b75b0ee commit 774d8aa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions utils/LayerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,14 @@ const LayerUtils = {
if (printBgLayerName) {
let match = null;
if ((match = printBgLayerName.match(/^(\w+):(.*)#([^#]+)$/)) && match[1] === "wms") {
const layer = {
type: 'wms',
params: {LAYERS: match[3], OPACITIES: '255', STYLES: ''},
url: match[2]
};
LayerUtils.addExternalLayerPrintParams(layer, params, printCrs, counterRef);
if (printExternalLayers) {
const layer = {
type: 'wms',
params: {LAYERS: match[3], OPACITIES: '255', STYLES: ''},
url: match[2]
};
LayerUtils.addExternalLayerPrintParams(layer, params, printCrs, counterRef);
}
} else {
params.LAYERS.push(printBgLayerName);
params.OPACITIES.push("255");
Expand Down

0 comments on commit 774d8aa

Please sign in to comment.