svelte-mapbox icon indicating copy to clipboard operation
svelte-mapbox copied to clipboard

map height

Open Thebigbignooby opened this issue 2 years ago • 1 comments

Thanks for this library!

I understand the map can be displayed by setting a fixed height in pixels, however this is inconvenient... is there no way to have it take the full height of the parent container?

can this be fixed? what seems to be causing this behaviour?

Thebigbignooby avatar Aug 09 '23 05:08 Thebigbignooby

If your parent div has width:100% then your maps will respect that, but if the parent of the parent has the same it will be 0 since that is how things work. The best way is to use the vh measure. for example, you can set the parent container to be height: 70vh, and your maps will show.

woss avatar Jan 06 '24 12:01 woss