var command = L.control.layers({ position: 'topright' });
command.onAdd = function (map) {
var div = L.DomUtil.create('div', 'hole');
div.innerHTML = `<input id="hole" type="checkbox"/>
<label for ="hole">Hole</label>`;
let input = document.getElementById('hole');
console.log(input);
input.addEventListener('click', () => {
disableAddPoint = true;
console.log('work!');
})
return div;
};
command.addTo(map);