MiniMap#
[1]:
import folium
from folium.plugins import MiniMap
m = folium.Map(location=(30, 20), zoom_start=4)
MiniMap().add_to(m)
m
[1]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Make the minimap collapsible#
[2]:
m = folium.Map(location=(30, 20), zoom_start=4)
MiniMap(toggle_display=True).add_to(m)
m
[2]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Change the minimap tile layer#
[3]:
m = folium.Map(location=(30, 20), zoom_start=4)
MiniMap().add_to(m)
m
[3]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Change the minimap position#
[4]:
m = folium.Map(location=(30, 20), zoom_start=4)
MiniMap(position="topleft").add_to(m)
m
[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Change the minimap size#
[5]:
m = folium.Map(location=(30, 20), zoom_start=4)
MiniMap(width=400, height=100).add_to(m)
m
[5]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Change the zoom offset#
[6]:
m = folium.Map(location=(30, 20), zoom_start=8)
MiniMap(zoom_level_offset=-8).add_to(m)
m
[6]:
Make this Notebook Trusted to load map: File -> Trust Notebook