diff --git a/src/controls/print/print-legend.js b/src/controls/print/print-legend.js index 7b7039967..78e0a417f 100644 --- a/src/controls/print/print-legend.js +++ b/src/controls/print/print-legend.js @@ -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 `