node-red-contrib-web-worldmap 2.38.2 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -1
- package/README.md +6 -2
- package/package.json +1 -1
- package/worldmap/worldmap.js +12 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
-
- v2.
|
|
3
|
+
- v2.39.0 - Add client timezone to connect message. PR #245
|
|
4
|
+
- v2.38.3 - Better fix for geojson multipoint icons.
|
|
4
5
|
- v2.38.1 - Fix for geojson multipoint icons.
|
|
5
6
|
- v2.38.0 - Return client headers as part of connect message.
|
|
6
7
|
- v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh
|
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@ Feel free to [ {
|
|
|
63
63
|
if (!inIframe) {
|
|
64
64
|
document.getElementById("footer").innerHTML = "<font color='#494'>"+pagefoot+"</font>";
|
|
65
65
|
}
|
|
66
|
-
ws.send(JSON.stringify({action:"connected",parameters:Object.fromEntries((new URL(location)).searchParams)}));
|
|
66
|
+
ws.send(JSON.stringify({action:"connected",parameters:Object.fromEntries((new URL(location)).searchParams),clientTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone || false}));
|
|
67
67
|
onoffline();
|
|
68
68
|
};
|
|
69
69
|
ws.onclose = function() {
|
|
@@ -2853,20 +2853,17 @@ function doGeojson(n,g,l,o) {
|
|
|
2853
2853
|
className: "natoicon",
|
|
2854
2854
|
});
|
|
2855
2855
|
}
|
|
2856
|
-
else if (feature.properties["marker-symbol"].substr(0,3) === "fa-") {
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
});
|
|
2868
|
-
}
|
|
2869
|
-
catch(e) { console.log(e); }
|
|
2856
|
+
else if (feature.properties.hasOwnProperty("marker-symbol") && feature.properties["marker-symbol"].substr(0,3) === "fa-") {
|
|
2857
|
+
var col = feature.properties["marker-color"] ?? "#910000";
|
|
2858
|
+
var imod = "";
|
|
2859
|
+
if (feature.properties["marker-symbol"].indexOf(" ") === -1) { imod = "fa-2x "; }
|
|
2860
|
+
myMarker = L.divIcon({
|
|
2861
|
+
className:"faicon",
|
|
2862
|
+
html: '<center><i class="fa fa-fw '+imod+feature.properties["marker-symbol"]+'" style="color:'+col+'"></i></center>',
|
|
2863
|
+
iconSize: [32, 32],
|
|
2864
|
+
iconAnchor: [16, 12],
|
|
2865
|
+
popupAnchor: [0, -16]
|
|
2866
|
+
});
|
|
2870
2867
|
}
|
|
2871
2868
|
else {
|
|
2872
2869
|
myMarker = L.VectorMarkers.icon({
|
|
@@ -2896,7 +2893,6 @@ function doGeojson(n,g,l,o) {
|
|
|
2896
2893
|
if ( tx !== "{}") {
|
|
2897
2894
|
l.bindPopup('<pre style="overflow-x: scroll">'+tx.replace(/[\{\}"]/g,'')+'</pre>');
|
|
2898
2895
|
}
|
|
2899
|
-
console.log("TX",tx.replace(/[\{\}"]/g,''))
|
|
2900
2896
|
}
|
|
2901
2897
|
if (o && o.hasOwnProperty("clickable") && o.clickable === true) {
|
|
2902
2898
|
l.on('click', function (e) {
|