Allow to define outlinkTarget at layer level

This commit is contained in:
Yohan Boniface 2023-06-21 12:24:29 +02:00
parent 3f8db1191f
commit a1ec50ed8c
2 changed files with 3 additions and 2 deletions

View file

@ -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':

View file

@ -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(