diff --git a/app.js b/app.js index d77030b..9765861 100644 --- a/app.js +++ b/app.js @@ -49,6 +49,8 @@ d3.select('svg').call(dragBehavior); d3.select('form').on('submit', function(){ d3.event.preventDefault(); + d3.selectAll('rect').remove(); + const lat1 = d3.select('input:first-child').node().value const lng1 = d3.select('input:nth-child(2)').node().value const location1 = worldProjection([lat1, lng1]);