I am using leaflet to build a layer control with three layers all of them shouldn't be on the map simultaneously. A layer should only appear on the map with a click. the code below doesn't work
var attractionnyc = L.layerGroup();
var museumsnyc = L.layerGroup();
var hotelsnyc = L.layerGroup();
L.control.layers ({}, {
'Attraction': attractionnyc,
}, {
collapsed: False,
}).addTo(map);
L.control.layers ({}, {
'Museum': museumsnyc,
}, {
collapsed: False,
}).addTo(map);
L.control.layers ({}, {
'Hotels': hotelsnyc,
}, {
collapsed: False,
}).addTo(map);