Skip to content

Commit

Permalink
Merge pull request #2841 from camptocamp/2.2
Browse files Browse the repository at this point in the history
merge 2.2 into master
  • Loading branch information
fredj committed Aug 28, 2017
2 parents 12b1dbe + 70614f7 commit 82c2600
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/services/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,13 @@ ngeo.Print.prototype.encodeImageWmsLayer_ = function(arr, layer) {
*/
ngeo.Print.prototype.encodeWmsLayer_ = function(arr, opacity, url, params) {
const customParams = {'TRANSPARENT': true};
ol.obj.assign(customParams, params);

// remove empty params
for (const key in params) {
const val = params[key];
if (val !== null && val !== undefined) {
customParams[key] = val;
}
}
delete customParams['LAYERS'];
delete customParams['FORMAT'];
delete customParams['SERVERTYPE'];
Expand Down

0 comments on commit 82c2600

Please sign in to comment.