Using st.pydeck_chart with a different map provider than Mapbox


I’m running the latest Streamlit version locally, and I’m implementing a map on my app which leverages st.pydeck_chart - Streamlit Docs

It’s a very powerful function, but I was wondering if there is the possibility to use it without relying on Mapbox (e.g. working on Google Maps, or other providers).

Thank you

Hi @espogian :wave:

Do you absolutely need to use st.pydeck_chart? If not, have you considered using the Folium component?


1 Like

Yes, I’m already using Folium and I’m pretty happy with it, except that:

  • It lacks the customisation I need in some situations;
  • The map is not automatically resizing depending on the window dimensions, but it has a fixed width and height;
  • The streamlit-folium shows a strange behaviour with pop-ups and Safari.

Thank you for mentioning that

Thanks for your feedback, @espogian! :pray:

Regarding the issue of the map not resizing automatically in Folium, you should be able to address this by specifying the width and height of the Folium map using percentages or relative units. E.g. setting the width to ‘100%’ and the height to ‘auto’ or ‘100vh’ should help.

As for the behavior with pop-ups on Safari, could you provide more details about the issue you’re experiencing? This should help in troubleshooting and finding a solution.


1 Like

Hi @Charly_Wargnier , thank you for the useful information provided! As per the issue of the pop-ups mentioned, all the details I was able to provide were already in the GitHub issue I have linked. Please check if you can replicate that bug. Thank you

Thanks, @espogian

I cannot find the GH issue - would you mind re-sharing, please?


Hi @Charly_Wargnier

The issue with streamlit_folium and Safari is pretty simple to replicate.
Just connect to this demo page:
Using a desktop Safari web browser.

You will see that it is impossible to see the pop-up when you click on a marker.

Thank you!

1 Like

I see, thank you – Yes, it appears to be a Safari-specific bug


1 Like