Demo of a Minimap in Folium


In [1]:
import folium
from folium.plugins import MiniMap

In [2]:
m = folium.Map(location=(30, 20), zoom_start=4)

minimap = MiniMap()
m.add_child(minimap)
m


Out[2]:

Make the minimap collapsable


In [3]:
m = folium.Map(location=(30, 20), zoom_start=4)
minimap = MiniMap(toggle_display=True)
minimap.add_to(m)
m


Out[3]:

Change the minimap tile layer


In [4]:
m = folium.Map(location=(30, 20), zoom_start=4)
minimap = MiniMap(tile_layer='Stamen Toner')
minimap.add_to(m)
m


Out[4]:

Change the minimap position


In [5]:
m = folium.Map(location=(30, 20), zoom_start=4)
minimap = MiniMap(position='topleft')
minimap.add_to(m)
m


Out[5]:

Change the minimap size


In [6]:
m = folium.Map(location=(30, 20), zoom_start=4)
minimap = MiniMap(width=400, height=100)
minimap.add_to(m)
m


Out[6]:

Change the zoom offset


In [7]:
m = folium.Map(location=(30, 20), zoom_start=8)
minimap = MiniMap(zoom_level_offset=-8)
minimap.add_to(m)
m


Out[7]: