Skip to content

Commit

Permalink
check for ?
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyblasta committed Oct 11, 2023
1 parent ab0916a commit 891cc4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controls/print/print-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ 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) {
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`;
Expand Down

0 comments on commit 891cc4e

Please sign in to comment.