//содал checkbox
function createBtnHoles(e) {
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>';
div.addEventListener('click', onCheckChange);
return div;
};
command.addTo(map);
}
createBtnHoles();
function onCheckChange(e) {
e.stopPropagation();
var inputValue = document.getElementById('hole');
if (inputValue.checked) {
console.log('onchange');
}
else {
console.log('false')
}
}