Get help from the marimo community

Updated 3 weeks ago

Rendering a Leafmap map with height, width=100%

My first use case for Marimo is for publishing maps created with Leafmap and I'm so close to what I need. I set the notebook width to full which gets me close, but I'd like to use the full extent of the webpage viewport. How might I accomplish this?
A
C
5 comments
I'm not too familiar with Leafmap. But I noticed it basic Map plot has a full-screen button. Is that not enough?
@Akshay I will definitely leverage that but in terms of the initial viz layout, I either want it to use the entire viewport or have a clear delineation of the extent of the map area. Neither of which I know how to do πŸ˜‰
The latter said more plainly - I'd want to be able to put a thin black border around the extent of the map area.
You can use mo.Html and embed the map in it:

Plain Text
mo.Html(
    f"""
    <div style='border: 4px solid'>
    {mo.as_html(m)}
    </div>
    """
)
Attachment
image.png
Beautiful @Akshay - thank you for this! I'll give this a go
Add a reply
Sign up and join the conversation on Discord