Display a map with points on it.

This is a wrapper around st.pydeck_chart to quickly create scatterplot charts on top of a map, with auto-centering and auto-zoom.

When using this command, we advise all users to use a personal Mapbox token. This ensures the map tiles used in this chart are more robust. You can do this with the mapbox.token config option.

To get a token for yourself, create an account at https://mapbox.com. It's free! (for moderate usage levels) See https://docs.streamlit.io/en/latest/cli.html#view-all-config-options for more info on how to set config options.

Function signature

st.map(data=None, zoom=None, use_container_width=True)


data (pandas.DataFrame, pandas.Styler, numpy.ndarray, Iterable, dict,)

or None The data to be plotted. Must have columns called 'lat', 'lon', 'latitude', or 'longitude'.

zoom (int)

Was this page helpful?

editSuggest edits

Still have questions?

Our forums are full of helpful information and Streamlit experts.