Streamlit-Folium

0.27.1 · active · verified Thu Apr 16

Streamlit-Folium seamlessly integrates the Folium mapping library into Streamlit applications, allowing users to render interactive geospatial visualizations. It provides both a bi-directional component, `st_folium()`, for enhanced user interaction and a static renderer, `folium_static()`. The library is actively maintained, with its current version 0.27.1 released on March 26, 2026, indicating a consistent release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This example initializes a Folium map centered on the Liberty Bell, adds a marker, and then renders it in a Streamlit application using the `st_folium` component, which enables bi-directional interaction. The `st_data` variable captures interaction events from the map.

import streamlit as st
import folium
from streamlit_folium import st_folium

st.set_page_config(layout="wide")

m = folium.Map(location=[39.949610, -75.150282], zoom_start=16)

folium.Marker(
    [39.949610, -75.150282],
    popup="Liberty Bell",
    tooltip="Liberty Bell"
).add_to(m)

st_data = st_folium(m, width=725)

view raw JSON →