Skip to content

Commit

Permalink
fix: only issue getlegendgraphic requests for wms layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Grammostola committed Oct 27, 2023
1 parent ac095cf commit e9fe41e
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 @@ -245,9 +245,12 @@ const LayerRow = function LayerRow(options) {
content = getTitleWithIcon(title, '');
} else if (layer.get('type').includes('AGS') || /\/arcgis\/services\/[^/]+\/[^/]+\/MapServer\/WMSServer/.test(getOneUrl(layer))) {
content = await getAGSJSONContent(title, layer.get('id'));
} else {
} else if (layer.get('type').includes('WMS')) {
content = await getWMSJSONContent(title);
}
if (content === '') {
content = getTitleWithIcon(title, '');
}
return `
<li id="${this.getId()}" class="flex row align-center padding-left padding-right item legend-${layer.get('type')}">
<div class="flex column">
Expand Down

0 comments on commit e9fe41e

Please sign in to comment.