Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added link to JS for realtime #179

Merged
merged 1 commit into from Apr 16, 2024

Conversation

hansthen
Copy link
Contributor

Closes #174.

I am a contributing developer of Folium and the developer of the Folium realtime plugin. Great work on streamlit-folium! I use Folium mainly from streamlit, so your package is really useful to me.

To fix the issue I added a link to the javascript file for realtime plugin to the component's public/index.html. I am curious though if streamlit-folium could not be changed to generate these links based on the Folium generated map. We are updating the Folium code base so that users can and and override javascript and css files at runtime. This would break the currently hardcoded list of javascript and css links.

The Folium generated code contains links to include the required javascript and css files. Is there some way these could be included in the generated code?

@randyzwitch
Copy link
Owner

I am curious though if streamlit-folium could not be changed to generate these links based on the Folium generated map...

Can you split this off into its own issue? If it works, that does seem desirable, but I don't know that it does/the idea will get lost once this obvious fix is merged

@blackary
Copy link
Collaborator

LGTM, thanks!

re: using folium to specify the JS and CSS, I have thought about that before #115, but haven't come up with a great way to do it. That would certainly help with issues like this where Folium gets updated and knows what new JS packages are to be included.

@hansthen
Copy link
Contributor Author

I am curious though if streamlit-folium could not be changed to generate these links based on the Folium generated map...

Can you split this off into its own issue? If it works, that does seem desirable, but I don't know that it does/the idea will get lost once this obvious fix is merged

Done.

@randyzwitch randyzwitch merged commit 56454c9 into randyzwitch:master Apr 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Folium Realtime plugin.
3 participants