This code make the map\'s div width max but height to 0 (the % value doesn\'t matter, it\'s always 0)
I ran into this topic because I wanted to set the map height in an ionic tab (ionicframework) to 100%. Even though this was not the original question maybe others run into this topic with the same issue. Additionally to the previous suggestions you have to set the height of the class .scroll to 100%:
html, body {
width: 100%;
height: 100%;
}
.scroll {
height: 100%;
}
#map {
height: 100%;
}