remove the geojson path if less than two markers are present

This commit is contained in:
Antonia 2025-03-10 15:51:17 +01:00
parent 54ba75dd1c
commit 954e8c4500

View file

@ -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 = [];