You can add a layer to the map without adding it to the control.
Looking at your Fireflies application, if you want to remove the states layer from the layer control while still having it display on the map, simply remove the states key/val from your overlays object.
You are already adding the states layer to the map with the following
var wmsstates = L.tileLayer.wms("http://jomdev.clemson.edu:8080/geoserver/it.geosolutions/wms", {
layers: 'it.geosolutions:USA_States',
format: 'image/png',
transparent: true,
version: '1.1.0',
attribution: "usastates"
});
wmsstates.addTo(map);
At this point it's already been added to the map. So now all you have to do is not add it to the Layer Control.
So, instead of this
var overlays = {
"Counties": wmscounty,
"States": wmsstates,
"Fireflies": geojsonFirefly
};
layersControl = new L.Control.Layers(baseLayers, overlays, {
collapsed: false,
id: 'irfancontrols'
});
Use this
var overlays = {
"Counties": wmscounty
"Fireflies": geojsonFirefly
};
layersControl = new L.Control.Layers(baseLayers, overlays, {
collapsed: false,
id: 'irfancontrols'
});
Since the States layer is no longer an overlay, it might be hidden underneath your basemap. To solve this you'll want to call bringToFront
wmsstates.bringToFront();
Great looking project BTW. :)