Here is an example of what I mean by sub-layers. Let's say that I was trying to track a group of dogs and a group of cats like this:
Dogs
-Fido
-Spot
-Rex
Cats
-Wiskers
-Garfield
-Tom
On the top layer I could select all the dogs or all the cats. In the sub-layer I could select any of the individual dogs or cats.
Are there any plans to implement this feature?
Plans? Yes. Manpower to do so? No.
This functionality is not available in Leaflet. This stackoverflow entry asks the same question, they mention this Leaflet plugin that adds grouping in layer control, but doesn't add hierarchy. So actual sub-layers seem difficult to achieve.
We now have this behavior with the FeatureGroupSubGroup plugin. Check out an example here:
Most helpful comment
We now have this behavior with the
FeatureGroupSubGroupplugin. Check out an example here:https://nbviewer.jupyter.org/github/python-visualization/folium/blob/master/examples/Plugins.ipynb#Sub-categories