diff --git a/CHANGELOG.md b/CHANGELOG.md index 1693d88..00867dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.38.1 - Fix for geojson multipoint icons. - v2.38.0 - Return client headers as part of connect message. - v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh - v2.37.3 - Fix hang on layer change diff --git a/README.md b/README.md index b5fa4d6..e77d453 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D% ### Updates +- v2.38.1 - Fix for geojson multipoint icons. - v2.38.0 - Return client headers as part of connect message. - v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh - v2.37.3 - Fix hang on layer change diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index c2db405..00af835 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -2795,7 +2795,7 @@ function doCommand(cmd) { // handle any incoming GEOJSON directly - may style badly function doGeojson(n,g,l,o) { - //console.log("GEOJSON",n,g,l,o) + // console.log("GEOJSON",n,g,l,o) var lay = l ?? g.name ?? "unknown"; // if (!basemaps[lay]) { var opt = { style: function(feature) { @@ -2867,9 +2867,11 @@ function doGeojson(n,g,l,o) { if (feature.properties.hasOwnProperty("url")) { feature.properties.url = ""+feature.properties.url+""; } - delete feature.properties["marker-symbol"]; - delete feature.properties["marker-color"]; - delete feature.properties["marker-size"]; + if (feature.geometry.hasOwnProperty("type") && feature.geometry.type !== "MultiPoint") { + delete feature.properties["marker-symbol"]; + delete feature.properties["marker-color"]; + delete feature.properties["marker-size"]; + } var nf = {title:feature.properties.title, name:feature.properties.name}; feature.properties = Object.assign(nf, feature.properties); return L.marker(latlng, {title:feature.properties.title ?? "", icon:myMarker});