From 0c0db633026e1f8baa4b73e373362d4a3357f09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bl=C3=A4sta?= Date: Wed, 12 Apr 2023 13:19:28 +0200 Subject: [PATCH 1/2] Ignore attribut type for featureinfo --- src/getattributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getattributes.js b/src/getattributes.js index b51b1f2e3..5db84df6c 100644 --- a/src/getattributes.js +++ b/src/getattributes.js @@ -224,7 +224,7 @@ function getAttributes(feature, layer, map) { const templateList = document.createElement('ul'); featureinfoElement.appendChild(templateList); templateList.innerHTML = li; - } else if (attribute.type !== 'hidden') { + } else { if (attribute.name) { val = getContent.name(feature, attribute, attributes, map); } else if (attribute.url) { From 1c93b791169336e8f8dfe7c8ff389be32ce54c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bl=C3=A4sta?= Date: Wed, 26 Apr 2023 15:41:57 +0200 Subject: [PATCH 2/2] feature: make it possible for named target for attribute links --- src/getattributes.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/getattributes.js b/src/getattributes.js index b2ca0cb54..43b61a819 100644 --- a/src/getattributes.js +++ b/src/getattributes.js @@ -27,12 +27,8 @@ function parseUrl(urlattr, feature, attribute, attributes, map, linktext) { } else if (attribute.target === 'modal-full') { aTarget = 'modal-full'; aCls = 'o-identify-link-modal'; - } else if (attribute.target === '_self') { - aTarget = '_self'; - } else if (attribute.target === '_top') { - aTarget = '_top'; - } else if (attribute.target === '_parent') { - aTarget = '_parent'; + } else { + aTarget = attribute.target ? attribute.target : '_blank'; } val = `${text}`; return val;