Folium

Download this notebook from GitHub (right-click to download).


import folium
import panel as pn

pn.extension(sizing_mode="stretch_width")

The Folium pane renders folium interactive maps.

Parameters:

For layout and styling related parameters see the customization user guide.

  • object (object): The Folium object being displayed


The Folium pane uses the built-in HTML representation provided by folium to render the map:

m = folium.Map(location=[52.51, 13.39], zoom_start=12)

folium_pane = pn.pane.plot.Folium(m, height=400)

folium_pane

Like any other pane, the Folium pane’s view can be updated by setting the object parameter:

# Add a marker to the map
folium.Marker(
    [52.516, 13.381], popup="<i>Brandenburg Gate</i>", tooltip="Click me!"
).add_to(m)

folium_pane.object = m
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

Download this notebook from GitHub (right-click to download).