First of all, I have to thank you for streamlit, such a great and beautiful library and it works perfectly.
On the other hand, I am facing a problem such as @Lazaro_Pinheiro_Domi . I have tried his code and also the following:
import streamlit as st
m = folium.Map([38.8934, -76.9470], tiles=’stamentoner’, zoom_start=12)
st.markdown(m._repr_html_(), unsafe_allow_html =True)
Firstly, I tried that way, but, as Lazaro mentioned, it just returns an empty white box. I have tried working with previous versions of Streamlit and Folium but no satisfactory result was obtained. I also tried to manually add the .html file that it is generated when you do
m.save('./map.html') with the following:
st.markdown('<iframe src="./STREAMLIT/img/map.html"> </iframe>', unsafe_allow_html=True)
However, it did not work (perhaps because my HTML knowledge is limited), it does not seem able to find the path, and I have tried many approaches. Note that img is a folder where I have put the map and that in the STREAMLIT folder is where it is the app.py.
One last approach I have thought about is maybe introducing a button that redirects to the HTML map (locally stored, because I am actually running this locally, I am not either planning to deploy this into a server yet), however, I cannot make it work.
Here is some more info:
Google Chrome 80.0, Mozilla 73.0
Thanks in advance and have a nice day!