Skip to content

Add better control for height when browser window is not maximized #2186

@ezst036

Description

@ezst036

Is your feature request related to a problem? Please describe.
I can set the map to something like:
folium.Map(location=[x, y], height='1000px')

and it looks proper when a browser is full screen. However if the browser window is not full screen then the map goes to a much reduced height.

If I use folium.Map(location=[x, y], height='100%')

then the height seems to potentially become 50px.

Describe the solution you'd like
I would like to be able to set both height and width at a percentage and the display is proper in a maximized or not maximized browser window. Straight forward such as this:

folium.Map(location=[x, y], height='100%')
folium.Map(location=[x, y], width='100%')

Describe alternatives you've considered
Tried a few CSS controls but could not seem to get something permanent.

Additional context
Add any other context or screenshots about the feature request here.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions