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
Render <class 'branca.element.Figure'> to allow resizing without white space #23
Comments
@GitHunter0, my apologies for not getting back to you sooner. It appears that branca Figures work the same way as Folium, meaning you can do something like:
This could be added to the package pretty quickly, the only thing would be accounting properly for people passing height/width as percentages as you did. Best, |
Hey @randyzwitch , any addition to the package in this regard would be nice. Thank you |
@GitHunter0 Version 0.5.0 was released to PyPI (will go to conda-forge whenever it processes) right now with basic Branca support. Please test this out and if something doesn't work as expected, create a new issue. Thanks for checking out streamlit-folium! |
Thanks for the update @randyzwitch ! I tested here and now However, it still keeps the map original frame size, so if you shrink the map, there will be unused space around it. Below there is a code and a video displaying this issue with folium + streamlit:
https://user-images.githubusercontent.com/26294221/153388740-f0b9d5c8-42ef-4659-afcb-0c6fdbb2fb0d.mp4 |
I think the re-size piece is an artifact of how static components currently work in Streamlit, I'm not sure this is something I can solve. I think that's what this other issue is meant to solve? |
It probably is, I hope Streamlit developers are aware of this issue, thank you @randyzwitch |
Hey @randyzwitch , thank you for providing this component, it's been very useful.
The only issue so far is that reducing folium width/height produces white space on the borders:
The solution is to use
branca.element.Figure
class:However, your component currently is not able to render it. Could you please enable that or suggest a workaround?
The text was updated successfully, but these errors were encountered: