diff --git a/CHANGELOG.md b/CHANGELOG.md index 3830e1c..5f33d40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### Change Log for Node-RED Worldmap - - v2.14.0 - Let geojson features be clickable if added as overlay + - v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s. + - v2.14.0 - Let geojson features be clickable if added as overlay. - v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing. - v2.13.3 - Fix unchanged layer propagation. - v2.13.2 - Add mayflower icon. diff --git a/README.md b/README.md index a7d22d1..68bf11e 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,15 @@ map web page for plotting "things" on. ### Updates -- v2.14.0 - Let geojson features be clickable if added as overlay +- v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s. +- v2.14.0 - Let geojson features be clickable if added as overlay. - v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing. - v2.13.3 - Fix unchanged layer propagation. - v2.13.2 - Add mayflower icon. - v2.13.0 - Tidy velocity layer. Feedback any url parameters. - v2.12.1 - Only show online layer options if we are online. - v2.12.0 - Add live rainfall radar data layer. Remove some non-loading overlays. -- v2.11.2 - Allow thicknesss of arc to be specified by weight +- v2.11.2 - Allow thicknesss of arc to be specified by weight. - v2.11.1 - Better handle KML point info - add popup. - v2.11.0 - Add option to smooth tracks using bezier curves. - v2.10.0 - Save latest position to browser for refresh if in iframe/dashboard. Allow fractional Zoom levels. diff --git a/package.json b/package.json index a9075ab..0eddb22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.14.0", + "version": "2.15.0", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "cgi": "0.3.1", diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index e6df490..1166691 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -94,7 +94,7 @@ var connect = function() { }; ws.onmessage = function(e) { try { var data = JSON.parse(e.data); handleData(data); } - catch (e) { console.log("BAD DATA"); return; } + catch (e) { if (data) { console.log("BAD DATA",data); } } // console.log("DATA",typeof data,data); }; } @@ -1750,7 +1750,7 @@ function setMarker(data) { // remove icon from list of properties, then add all others to popup if (data.hasOwnProperty("alt")) { data.alt = (1*data.alt).toFixed(2); } - if (data.hasOwnProperty("speed")) { data.speed = (1*data.speed).toFixed(2); } + //if (data.hasOwnProperty("speed")) { data.speed = parseFloat(data.speed).toFixed(2); } if (data.hasOwnProperty("SIDC") && data.hasOwnProperty("options")) { delete data.options; } if (data.hasOwnProperty("icon")) { delete data.icon; } if (data.hasOwnProperty("iconColor")) { delete data.iconColor; } @@ -1856,7 +1856,7 @@ function setMarker(data) { else { words = words + marker.getLatLng().toString().replace('LatLng(','lat, lon : ').replace(')',''); } words = ""+data.name+"
" + words; //"
" + words; var wopt = {autoClose:false, closeButton:true, closeOnClick:false, minWidth:200}; - if (words.indexOf('