diff --git a/src/agenda_culturel/static/location_field/js/form.js b/src/agenda_culturel/static/location_field/js/form.js index 4cd34ab..528c0c4 100644 --- a/src/agenda_culturel/static/location_field/js/form.js +++ b/src/agenda_culturel/static/location_field/js/form.js @@ -398,10 +398,9 @@ var SequentialLoader = function() { map.addLayer(layer); if ((window.other_markers !== null) && (window.other_markers.length > 0)) { - var layerGroup = L.layerGroup(); - window.other_markers.forEach(x => - layerGroup.addLayer(x) - ); + var layerGroup = L.layerGroup().addTo(map); + window.other_markers.forEach(x => layerGroup.addLayer(x)); + map.removeLayer(layerGroup); map.on('zoomend', function () { var currentZoom = map.getZoom();