Fix for undefined label name in geojson

This commit is contained in:
Dave Conway-Jones 2023-11-09 09:49:32 +00:00
parent ceb80e47d9
commit 7a9b38f6ac
No known key found for this signature in database
GPG Key ID: 1DDB0E91A28C2643

View File

@ -3143,7 +3143,9 @@ function doGeojson(n,g,l,o) { // name, geojson, layer, options
delete tx["name"];
tx = JSON.stringify(tx,null,' ');
if ( tx !== "{}") {
l.bindPopup('<b>'+n+'</b><pre style="overflow-x:scroll">'+tx.replace(/[\{\}"]/g,'')+'</pre>');
var gp = '<pre style="overflow-x:scroll">'+tx.replace(/[\{\}"]/g,'')+'</pre>'
if (n) { gp = '<b>'+n+'</b>' + gp; }
l.bindPopup(gp);
}
}
if (o && o.hasOwnProperty("clickable") && o.clickable === true) {