Fix worldmap in node to start after out node ready

This commit is contained in:
Dave Conway-Jones 2019-02-06 19:17:00 +00:00
parent 6aa8643cc6
commit 4402a660ba
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
4 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,8 @@ map web page for plotting "things" on.
### Updates ### 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.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.17 - Allow setting maxage to 0 (infinite) correctly - Issue #64
- v1.5.16 - Allow setting panlock, zoomlock and hiderightclick via commands - Issue #60 - v1.5.16 - Allow setting panlock, zoomlock and hiderightclick via commands - Issue #60

View File

@ -130,7 +130,7 @@ module.exports = function(RED) {
node.status({fill:"green",shape:"dot",text:"connected "+Object.keys(clients).length}); node.status({fill:"green",shape:"dot",text:"connected "+Object.keys(clients).length});
client.on('data', function(message) { client.on('data', function(message) {
message = JSON.parse(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() { client.on('close', function() {
delete clients[client.id]; delete clients[client.id];

View File

@ -171,7 +171,7 @@ var connect = function() {
}; };
ws.onmessage = function(e) { ws.onmessage = function(e) {
var data = JSON.parse(e.data); var data = JSON.parse(e.data);
//console.log("DATA",typeof data,data); console.log("DATA",typeof data,data);
if (Array.isArray(data)) { if (Array.isArray(data)) {
//console.log("ARRAY"); //console.log("ARRAY");
for (var prop in data) { for (var prop in data) {

View File

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
# date: Feb 5th 2019 - v1.5.19 # date: Feb 6th 2019 - v1.5.20
CACHE: CACHE:
index.html index.html