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) { view: function (e) {
if (this.map.editEnabled) return if (this.map.editEnabled) return
const outlink = this.properties._umap_options.outlink, const outlink = this.getOption('outlink'),
target = this.properties._umap_options.outlinkTarget target = this.getOption('outlinkTarget')
if (outlink) { if (outlink) {
switch (target) { switch (target) {
case 'self': case 'self':

View file

@ -862,6 +862,7 @@ L.U.DataLayer = L.Evented.extend({
'options.showLabel', 'options.showLabel',
'options.labelDirection', 'options.labelDirection',
'options.labelInteractive', 'options.labelInteractive',
'options.outlinkTarget',
] ]
builder = new L.U.FormBuilder(this, popupFields, { callback: redrawCallback }) builder = new L.U.FormBuilder(this, popupFields, { callback: redrawCallback })
const popupFieldset = L.DomUtil.createFieldset( const popupFieldset = L.DomUtil.createFieldset(