diff --git a/README.md b/README.md index 5a99766..33efc92 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ map web page for plotting "things" on. ### Updates +- v1.5.20 - Let worldmap in node send message after out node has initialised +- v1.5.19 - Fix map path label - v1.5.18 - Update Leaflet.vector-markers to 0.0.6 (https://github.com/hiasinho/Leaflet.vector-markers) - v1.5.17 - Allow setting maxage to 0 (infinite) correctly - Issue #64 - v1.5.16 - Allow setting panlock, zoomlock and hiderightclick via commands - Issue #60 diff --git a/worldmap.js b/worldmap.js index 6780e39..db9c5b5 100644 --- a/worldmap.js +++ b/worldmap.js @@ -130,7 +130,7 @@ module.exports = function(RED) { node.status({fill:"green",shape:"dot",text:"connected "+Object.keys(clients).length}); client.on('data', function(message) { message = JSON.parse(message); - node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id}); + setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id})}); }); client.on('close', function() { delete clients[client.id]; diff --git a/worldmap/index.html b/worldmap/index.html index 1f1278a..ca06671 100644 --- a/worldmap/index.html +++ b/worldmap/index.html @@ -171,7 +171,7 @@ var connect = function() { }; ws.onmessage = function(e) { var data = JSON.parse(e.data); - //console.log("DATA",typeof data,data); + console.log("DATA",typeof data,data); if (Array.isArray(data)) { //console.log("ARRAY"); for (var prop in data) { diff --git a/worldmap/worldmap.appcache b/worldmap/worldmap.appcache index 3fb79c8..d786168 100644 --- a/worldmap/worldmap.appcache +++ b/worldmap/worldmap.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# date: Feb 5th 2019 - v1.5.19 +# date: Feb 6th 2019 - v1.5.20 CACHE: index.html