Commit 5508f6a6 authored by Sp3r4z's avatar Sp3r4z
Browse files

[Script] Fix county problem when not found

parent b7a5c1ba
......@@ -19,6 +19,7 @@ L.Control.geocoder({
})
.on('markgeocode', function(e) {
var center = e.geocode.center
if(departement != null) departement.removeFrom(theMap)
if(circle != null) circle.removeFrom(theMap)
circle = L.circle([center.lat, center.lng], {radius: 100000})
circle.addTo(theMap);
......@@ -36,7 +37,6 @@ L.Control.geocoder({
fetch('geojson/'+departementRef+'.geojson')
.then(response => response.json())
.then(datas => {
if(departement != null) departement.removeFrom(theMap)
departement = L.geoJSON(datas)
departement.addTo(theMap)
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment