My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so:
so I'm grabbing a wms layer from geoserver and I'm trying to make it display in my leaflet base map, but I don't think I have to actually go about creating a feature group. I think the url could possibly be simply:
but then that would mean I need to structure the layer property which I am also unsure how to do so correctly. I think essentially I want to satisfy the GetCapability, GetMap, and GetFeatureInfo requests using leaflet's API. And I think this is possible to do by utilizing only the layer group methods and the tilelayer methods. In addition I don't want to have to utilize onclick to retrieve the GetFeatureInfo because essentially I am adding in data programmatically.
I've seen examples utilizing the onClick eventlistener to do this, but I'd like it to be a toggle under the layer controls for visibility as it still is an overlay. So essentially I'd like to have a controls based listener as opposed to onclick.