This commit is contained in:
Dave Conway-Jones 2023-07-31 09:34:55 +01:00
parent e9a7f66bdc
commit 91c52b2ff4
No known key found for this signature in database
GPG Key ID: 1DDB0E91A28C2643

View File

@ -2854,19 +2854,16 @@ function doGeojson(n,g,l,o) {
});
}
else if (feature.properties.hasOwnProperty("marker-symbol") && feature.properties["marker-symbol"].substr(0,3) === "fa-") {
try {
var col = feature.properties["marker-color"] ?? "#910000";
var imod = "";
if (feature.properties["marker-symbol"].indexOf(" ") === -1) { imod = "fa-2x "; }
myMarker = L.divIcon({
className:"faicon",
html: '<center><i class="fa fa-fw '+imod+feature.properties["marker-symbol"]+'" style="color:'+col+'"></i></center>',
iconSize: [32, 32],
iconAnchor: [16, 12],
popupAnchor: [0, -16]
});
}
catch(e) { console.log(e); }
var col = feature.properties["marker-color"] ?? "#910000";
var imod = "";
if (feature.properties["marker-symbol"].indexOf(" ") === -1) { imod = "fa-2x "; }
myMarker = L.divIcon({
className:"faicon",
html: '<center><i class="fa fa-fw '+imod+feature.properties["marker-symbol"]+'" style="color:'+col+'"></i></center>',
iconSize: [32, 32],
iconAnchor: [16, 12],
popupAnchor: [0, -16]
});
}
else {
myMarker = L.VectorMarkers.icon({