map: make sure source callsign is trimmed
since the library seems to not do this...
This commit is contained in:
parent
c5cf330238
commit
adfc16c917
@ -58,9 +58,9 @@ function plotPaths(packets) {
|
|||||||
.filter(packet => 'data' in packet && 'latitude' in packet.data)
|
.filter(packet => 'data' in packet && 'latitude' in packet.data)
|
||||||
// join into Arrays of points
|
// join into Arrays of points
|
||||||
.reduce((acc, packet) => {
|
.reduce((acc, packet) => {
|
||||||
if (!acc.has(packet.from.toString())) acc.set(packet.from.toString(), []);
|
let callsign = packet.from.toString().trim();
|
||||||
acc.get(packet.from.toString()).push([packet.data.longitude,
|
if (!acc.has(callsign)) acc.set(callsign, []);
|
||||||
packet.data.latitude]);
|
acc.get(callsign).push([packet.data.longitude, packet.data.latitude]);
|
||||||
return acc;
|
return acc;
|
||||||
}, new Map());
|
}, new Map());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user