From a1ec50ed8c99f34858e2f59198e704caaf33a2ee Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 21 Jun 2023 12:24:29 +0200 Subject: [PATCH] Allow to define outlinkTarget at layer level --- umap/static/umap/js/umap.features.js | 4 ++-- umap/static/umap/js/umap.layer.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index 67d1e346..461215e2 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -57,8 +57,8 @@ L.U.FeatureMixin = { view: function (e) { if (this.map.editEnabled) return - const outlink = this.properties._umap_options.outlink, - target = this.properties._umap_options.outlinkTarget + const outlink = this.getOption('outlink'), + target = this.getOption('outlinkTarget') if (outlink) { switch (target) { case 'self': diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index adebd44f..5647b89b 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -862,6 +862,7 @@ L.U.DataLayer = L.Evented.extend({ 'options.showLabel', 'options.labelDirection', 'options.labelInteractive', + 'options.outlinkTarget', ] builder = new L.U.FormBuilder(this, popupFields, { callback: redrawCallback }) const popupFieldset = L.DomUtil.createFieldset(