vue-mapbox
vue-mapbox copied to clipboard
MglMapWrapper has default 0px height
Hi,
after spending several hours debugging why am I not able to show the map even with base example from documentation I found out that even though class mgl_map_wrapper has height set to 100%, somehow, somewhere something happens and height of the entire container is set to 0. Thus, map is not visible.

I also found someone else who struggles with this: https://stackoverflow.com/questions/58048819/vue-js-mapbox-map-not-showing
Hello
You can always add a css class to your container, somethings like:
<mgl-map :access-token="mbox.apiKey" :map-style.sync="mbox.style" container="myAwesomeMap" />
And in your CSS section you can add
#myAwesomeMap{
height: 500px;
width: 100%;
}
Me too. Killed several hours to find out what happens, but nothing
Do you guys have any feedback or updates on the matter? I am also stuck with a map that does not show.