From a333ac83bda3a80151547bf3597d3af43def17e8 Mon Sep 17 00:00:00 2001 From: nakiabrewer Date: Sat, 18 Mar 2017 20:50:26 +1100 Subject: [PATCH] addition of msg.payload.addtoheatmap and msg.payload.intensity Removed msg.payload.int Now just use msg.payload.intensity regardless if position is lat & lon OR latitude & longitude --- worldmap/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldmap/index.html b/worldmap/index.html index d5530bf..b530366 100644 --- a/worldmap/index.html +++ b/worldmap/index.html @@ -777,7 +777,7 @@ function setMarker(data) { else { console.log("No location:",data); return; } // Adding new L.LatLng object (lli) when optional intensity value is defined. Only for use in heatmap layer if (typeof data.coordinates == "object") { lli = new L.LatLng(data.coordinates[2],data.coordinates[1],data.coordinates[0]); } - else if (data.hasOwnProperty("lat") && data.hasOwnProperty("lon") && data.hasOwnProperty("int")) { lli = new L.LatLng((data.lat*1), (data.lon*1), (data.int*1)); } + else if (data.hasOwnProperty("lat") && data.hasOwnProperty("lon") && data.hasOwnProperty("intensity")) { lli = new L.LatLng((data.lat*1), (data.lon*1), (data.intensity*1)); } else if (data.hasOwnProperty("latitude") && data.hasOwnProperty("longitude") && data.hasOwnProperty("intensity")) { lli = new L.LatLng((data.latitude*1), (data.longitude*1), (data.intensity*1)); } else { lli = ll }