Difference icon_type between folium and st_folium

Hello, I have a rendering issue between Folium and st_folium.
Indeed, st_folium doesn’t display the numbers in my bubbles. With Folium, I use the icons fa-1, fa-2,…
And when I use st_folium, the numbers in the markers disappear.

Have you ever encountered this issue?

Yes, it looks like a bug in st_folium to me.

import streamlit as st
import folium
from folium.map import Icon
from streamlit_folium import st_folium


m = folium.Map(location=[39.949610, -75.13282], zoom_start=14, height=500)

icons_list = ["1", "2", "3", "star", "heart"]

for i, icon in enumerate(icons_list):
        [39.949610, -75.150282 + i/100],
        icon=Icon(icon=icon, prefix='fa', color='red', icon_color='white')

cols = st.columns(2)

with cols[0]:
    "## Using `components.html`"
        m.get_root()._repr_html_(), height=500,

with cols[1]:
    "## Using `st_folium`"
    st_folium(m, returned_objects=[], use_container_width=True, height=500)
1 Like

Hi @edsaac ,
I’m not alone
how to report this problem for correction?

You could raise an issue at their repository. I believe @randyzwitch here was the maintainer.

1 Like

Thank you
I have use your code and picture to explain the problem.
and I mentioned your name

@edsaac , the version 0.20 of streamlit_folium solve the problem:

see the answer from github Difference icon_type between folium and st_folium · Issue #170 · randyzwitch/streamlit-folium · GitHub
Thank you for your help!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.