From adfc16c917b7b59a9b00af467f4ee7d1d2f4ef94 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 9 Aug 2018 20:47:37 -0400 Subject: [PATCH] map: make sure source callsign is trimmed since the library seems to not do this... --- src/map.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map.js b/src/map.js index 4315e59..3d65f19 100644 --- a/src/map.js +++ b/src/map.js @@ -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());