I suspect that the map height is based on percentages in your app (CSS) and when the page originally loads, the area is either hidden (e.g. in a tab), or there is something that starts the available area of the map smaller than increased. With this in mind, it's likely that the s used by the map needs to be resized (they don't scale automatically with percentage sizes in CSS). One thing to try is to call the maps resize
function when viewing the map. This will force it to recalculate the available area and resize the canvas.
map.resize()
is likely all you need. If you are hiding the map in a tab or hidden part of the page, call this function when switching to the map view.