[GIS] Disable radio button for a single overlay layer in leaflet

htmlleaflet

I have added a bunch layers as a leaflet overlays. How can I remove the radio button for 1 of the overlay layers so that it is by default on and users cannot toggle it on and off?. I have been looking at Layer.control.extend and I am not sure if it is the correct path.

enter image description here

Best Answer

  1. YourLayerName.addTo(map);
  2. remove from the layer control.

The addTo(map) adds the layer to the map and if it's not in the layer control no one can turn it off.