python-visualization / folium

Python Data. Leaflet.js Maps.
https://python-visualization.github.io/folium/
MIT License
6.93k stars 2.23k forks source link

opened_symbol option in TreeLayerControl not functioning #1980

Closed Doyley1 closed 5 months ago

Doyley1 commented 5 months ago

The opened_symbol option as part of TreeLayerControl is not functioning correctly due to a typo in treelayercontrol.py, this will mean the default '-' will always show no matter the value you put in this option.

In treelayercontrol.py in line 151:

super().__init__()
self._name = "TreeLayerControl"
kwargs["closed_symbol"] = closed_symbol
kwargs["openened_symbol"] = opened_symbol
kwargs["space_symbol"] = space_symbol
kwargs["selector_back"] = selector_back
kwargs["named_toggle"] = named_toggle
kwargs["collapse_all"] = collapse_all
kwargs["expand_all"] = expand_all
kwargs["label_is_selector"] = label_is_selector
self.options = parse_options(**kwargs)
self.base_tree = base_tree
self.overlay_tree = overlay_tree

Instead of "openened_symbol" it should be "opened_symbol"

Environment:

Workaround Adjust the treelayercontrol.py file to be "opened_symbol" in the meantime

Conengmo commented 5 months ago

Good find! Do you want to open a PR maybe?

Doyley1 commented 5 months ago

Yeah, I will do when I get round to it, putting it here in case anyone gets to it before me :)