diff --git a/frontend/common/map.js b/frontend/common/map.js index f065954..6cc636a 100644 --- a/frontend/common/map.js +++ b/frontend/common/map.js @@ -69,7 +69,10 @@ let geojsons = []; let geojson; async function updateBrouter () { - if (markers.length < 1) { + if (markers.length < 2) { + if (geojson != undefined) { + map.removeLayer(geojson); + } return; } geojsons = [];