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

MglMapWrapper has default 0px height

Open tomasMizera opened this issue 6 years ago • 3 comments

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.

mapbox

I also found someone else who struggles with this: https://stackoverflow.com/questions/58048819/vue-js-mapbox-map-not-showing

tomasMizera avatar Dec 04 '19 13:12 tomasMizera

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%;
}

hicham-saddek avatar Jul 20 '21 14:07 hicham-saddek

Me too. Killed several hours to find out what happens, but nothing

igolka97 avatar Aug 08 '21 21:08 igolka97

Do you guys have any feedback or updates on the matter? I am also stuck with a map that does not show.

Christo-Deyzel avatar Sep 07 '21 16:09 Christo-Deyzel