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)
|
||||
// join into Arrays of points
|
||||
.reduce((acc, packet) => {
|
||||
if (!acc.has(packet.from.toString())) acc.set(packet.from.toString(), []);
|
||||
acc.get(packet.from.toString()).push([packet.data.longitude,
|
||||
packet.data.latitude]);
|
||||
let callsign = packet.from.toString().trim();
|
||||
if (!acc.has(callsign)) acc.set(callsign, []);
|
||||
acc.get(callsign).push([packet.data.longitude, packet.data.latitude]);
|
||||
return acc;
|
||||
}, new Map());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user