diff --git a/src/controls/print/print-legend.js b/src/controls/print/print-legend.js index 9e89f098b..3a64430f4 100644 --- a/src/controls/print/print-legend.js +++ b/src/controls/print/print-legend.js @@ -61,7 +61,10 @@ const LayerRow = function LayerRow(options) { const layerName = aLayer.get('name'); const style = viewer.getStyle(aLayer.get('styleName')); if (style && style[0] && style[0][0] && style[0][0].icon) { - return `${style[0][0].icon.src}&format=${format}`; + if (style[0][0].icon.src.includes('?')) { + return `${style[0][0].icon.src}&format=${format}`; + } + return `${style[0][0].icon.src}?format=${format}`; } return `${url}?SERVICE=WMS&layer=${layerName}&format=${format}&version=1.1.1&request=getLegendGraphic&scale=401&legend_options=dpi:300`; };