id101112
id101112

Reputation: 1042

can I create a drop down list on the folium map in python?

can I render a drop down list on the folium map in python to switch between multiple data?

I know there is the option of layers, but i wanna use the dropdown list? is there any possible way to do that???

Upvotes: 0

Views: 7331

Answers (1)

Conengmo
Conengmo

Reputation: 803

You can add a LayerControl to a map. That will give you a list with layers with buttons. If you make a layer for each data source, you can switch between them.

m = folium.Map()
# add data layers
folium.LayerControl().add_to(m)

For a simple example check out this notebook:

https://nbviewer.jupyter.org/github/python-visualization/folium/blob/master/examples/FeatureGroup.ipynb

Upvotes: 1

Related Questions