Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
holoviz
GitHub Repository: holoviz/panel
Path: blob/main/examples/reference/panes/Folium.ipynb
2011 views
Kernel: Unknown Kernel
import folium import panel as pn pn.extension(sizing_mode="stretch_width")

The Folium pane renders folium interactive maps.

Parameters:

For details on other options for customizing the component see the layout and styling how-to guides.

  • 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