remove the geojson path if less than two markers are present
This commit is contained in:
parent
54ba75dd1c
commit
954e8c4500
1 changed files with 4 additions and 1 deletions
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue