folium
folium copied to clipboard
Leaflet.Control.Layers.Tree as a plugin in folium
I would love to see Leaflet.Control.Layers.Tree as a plugin in folium! https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree
It would boost the ability to interact with mulit-layered data maps created by folium.
Nice example: https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/airports.html
This PR #1592 : "add groupedlayercontrol plugin" is the closest thing to the feature so far, which comes in response to the issue #1025 : "Radio control instead of checkboxs for layer control" that requests something like Leaflet plugin leaflet-groupedlayercontrol, but it seems it's been hanging there with no new reviews or checks for merge.
https://github.com/python-visualization/folium/pull/1592 was merged and will be included in the 0.14.0 release. It doesn't contain functionality for layer control trees, so we can keep this issue open.
@Conengmo I can take a stab at porting this plugin to Folium. I used it in another project and I am quite fond of it. The main issue I foresee is that Leaflet.Control.Layers.Tree
is configured through a javascript dictionary with functions at arbitrary locations in the tree.
Can I pilfer your tojavascript
filter from the draft PR in https://github.com/python-visualization/folium/pull/1856?