folium icon indicating copy to clipboard operation
folium copied to clipboard

Leaflet.Control.Layers.Tree as a plugin in folium

Open vizsim opened this issue 2 years ago • 2 comments

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

grafik

vizsim avatar Jul 02 '22 13:07 vizsim

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.

IndigoWizard avatar Aug 06 '22 00:08 IndigoWizard

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 avatar Nov 17 '22 14:11 Conengmo

@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?

hansthen avatar Mar 08 '24 07:03 hansthen