node-red-contrib-web-worldmap 2.27.0 → 2.27.1
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 +1 -1
- package/README.md +1 -1
- package/package.json +1 -1
- package/worldmap.js +1 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
-
- v2.27.
|
|
3
|
+
- v2.27.1 - Reload existing markers for late joiners
|
|
4
4
|
- v2.26.1 - Add QTH/Maidenhead option also
|
|
5
5
|
- v2.26.0 - Add UTM and MGRS to coordinate display options.
|
|
6
6
|
- v2.25.0 - Add bounds command to set overall map bounds.
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
-
- v2.27.
|
|
14
|
+
- v2.27.1 - Reload existing markers for late joiners
|
|
15
15
|
- v2.26.1 - Add QTH/Maidenhead option also
|
|
16
16
|
- v2.26.0 - Add UTM and MGRS to coordinate display options.
|
|
17
17
|
- v2.25.0 - Add bounds command to set overall map bounds.
|
package/package.json
CHANGED
package/worldmap.js
CHANGED
|
@@ -62,17 +62,6 @@ module.exports = function(RED) {
|
|
|
62
62
|
RED.httpNode.use(node.path, express.static(__dirname + '/worldmap'));
|
|
63
63
|
// RED.httpNode.use(node.path, express.static(__dirname + '/worldmap', {maxage:3600000}));
|
|
64
64
|
|
|
65
|
-
// var cleanup = function() {
|
|
66
|
-
// var d = Date.now();
|
|
67
|
-
// for (var m in allPoints) {
|
|
68
|
-
// if (allPoints[m].ts < d) {
|
|
69
|
-
// console.log("DING",m)
|
|
70
|
-
// delete allPoints[m];
|
|
71
|
-
// }
|
|
72
|
-
// }
|
|
73
|
-
// }
|
|
74
|
-
// var stale = setInterval(function() { cleanup() }, 20000);
|
|
75
|
-
|
|
76
65
|
var callback = function(client) {
|
|
77
66
|
if (!client.headers.hasOwnProperty("user-agent")) { client.close(); }
|
|
78
67
|
//client.setMaxListeners(0);
|
|
@@ -114,7 +103,6 @@ module.exports = function(RED) {
|
|
|
114
103
|
client.write(JSON.stringify({command:c}));
|
|
115
104
|
var o = Object.values(allPoints);
|
|
116
105
|
o.map(v => delete v.tout);
|
|
117
|
-
//console.log("AP",o.length);
|
|
118
106
|
setTimeout(function() { client.write(JSON.stringify(o)) }, 250);
|
|
119
107
|
}
|
|
120
108
|
});
|
|
@@ -138,14 +126,13 @@ module.exports = function(RED) {
|
|
|
138
126
|
}
|
|
139
127
|
}
|
|
140
128
|
if (msg.payload.hasOwnProperty("name")) {
|
|
141
|
-
allPoints[msg.payload.name] = msg.payload;
|
|
129
|
+
allPoints[msg.payload.name] = RED.util.cloneMessage(msg.payload);
|
|
142
130
|
var t = node.maxage || 3600;
|
|
143
131
|
if (msg.payload.ttl && msg.payload.ttl < t) { t = msg.payload.ttl; }
|
|
144
132
|
allPoints[msg.payload.name].tout = setTimeout( function() { delete allPoints[msg.payload.name] }, t * 1000 );
|
|
145
133
|
}
|
|
146
134
|
});
|
|
147
135
|
node.on("close", function() {
|
|
148
|
-
// if (stale) { clearInterval(stale); }
|
|
149
136
|
for (var c in clients) {
|
|
150
137
|
if (clients.hasOwnProperty(c)) {
|
|
151
138
|
clients[c].end();
|