Skip to content

Commit

Permalink
Merge branch 'new-selection-styles' of https://github.com/origo-map/o…
Browse files Browse the repository at this point in the history
…rigo into new-selection-styles
  • Loading branch information
jokd committed Oct 20, 2023
2 parents c80068b + 9a8b313 commit 43306b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controls/print/print-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
};
Expand Down

0 comments on commit 43306b4

Please sign in to comment.