Fix for geojson multipoint icons
This commit is contained in:
parent
9fc059ca4c
commit
21d3ab4f95
@ -1,5 +1,6 @@
|
|||||||
### Change Log for Node-RED Worldmap
|
### 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.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.4 - Fix sessionid specific data not to be sent on reload/refresh
|
||||||
- v2.37.3 - Fix hang on layer change
|
- v2.37.3 - Fix hang on layer change
|
||||||
|
@ -13,6 +13,7 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%
|
|||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
- v2.38.1 - Fix for geojson multipoint icons.
|
||||||
- v2.38.0 - Return client headers as part of connect message.
|
- 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.4 - Fix sessionid specific data not to be sent on reload/refresh
|
||||||
- v2.37.3 - Fix hang on layer change
|
- v2.37.3 - Fix hang on layer change
|
||||||
|
@ -2795,7 +2795,7 @@ function doCommand(cmd) {
|
|||||||
|
|
||||||
// handle any incoming GEOJSON directly - may style badly
|
// handle any incoming GEOJSON directly - may style badly
|
||||||
function doGeojson(n,g,l,o) {
|
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";
|
var lay = l ?? g.name ?? "unknown";
|
||||||
// if (!basemaps[lay]) {
|
// if (!basemaps[lay]) {
|
||||||
var opt = { style: function(feature) {
|
var opt = { style: function(feature) {
|
||||||
@ -2867,9 +2867,11 @@ function doGeojson(n,g,l,o) {
|
|||||||
if (feature.properties.hasOwnProperty("url")) {
|
if (feature.properties.hasOwnProperty("url")) {
|
||||||
feature.properties.url = "<a target='_new' href='"+feature.properties.url+"'>"+feature.properties.url+"</a>";
|
feature.properties.url = "<a target='_new' href='"+feature.properties.url+"'>"+feature.properties.url+"</a>";
|
||||||
}
|
}
|
||||||
delete feature.properties["marker-symbol"];
|
if (feature.geometry.hasOwnProperty("type") && feature.geometry.type !== "MultiPoint") {
|
||||||
delete feature.properties["marker-color"];
|
delete feature.properties["marker-symbol"];
|
||||||
delete feature.properties["marker-size"];
|
delete feature.properties["marker-color"];
|
||||||
|
delete feature.properties["marker-size"];
|
||||||
|
}
|
||||||
var nf = {title:feature.properties.title, name:feature.properties.name};
|
var nf = {title:feature.properties.title, name:feature.properties.name};
|
||||||
feature.properties = Object.assign(nf, feature.properties);
|
feature.properties = Object.assign(nf, feature.properties);
|
||||||
return L.marker(latlng, {title:feature.properties.title ?? "", icon:myMarker});
|
return L.marker(latlng, {title:feature.properties.title ?? "", icon:myMarker});
|
||||||
|
Loading…
Reference in New Issue
Block a user