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
This commit is contained in:
nakiabrewer 2017-03-18 20:50:26 +11:00 committed by GitHub
parent 64f1393073
commit a333ac83bd

View File

@ -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 }