From 46a9756f8b8d26d8bbe548a46360329729e3c11d Mon Sep 17 00:00:00 2001 From: mbilker Date: Mon, 30 Jan 2017 11:35:43 -0500 Subject: [PATCH] Non-mapped records are tagged instead of stored in separate array --- main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 5b83be3..4ff866c 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,6 @@ //Array of markers var markers = new Array(); - var nonPlacedRecords = new Array(); //Create a new Date object for the current date var currentDate = new Date(); @@ -85,7 +84,7 @@ function displayPastMonth() { markers.forEach((marker, i) => { - marker.inDate = true; + marker.inDate = true; if (!marker.filtered) { marker.pin.addTo(map); } @@ -354,12 +353,13 @@ }); record.pin.bindPopup(dataSource.popup(record)); - record.pin.addTo(map); - markers.push(record); + + record.isMapped = true; } else { - nonPlacedRecords.push(record); + record.isMapped = false; } + markers.push(record); }) }); }