Skip to content

Commit

Permalink
Merge pull request #9037 from camptocamp/print-chtopo-gsgmf-1984
Browse files Browse the repository at this point in the history
Create an empty style if he doesn't exists
  • Loading branch information
sbrunner committed Mar 17, 2023
2 parents d226670 + 272f45c commit b59ded0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/print/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ PrintService.prototype.encodeWmsLayer_ = function (arr, layer, url, params) {
serverType = params.SERVERTYPE;
}

// Add empty styles if needed
if (!params.STYLES) {
params.STYLES = '';
}

// Get the same amount of styles than layers to print
while (params.LAYERS.split(',').length > params.STYLES.split(',').length) {
params.STYLES += ',';
Expand Down

0 comments on commit b59ded0

Please sign in to comment.