added resize function when map is selected from menu and button bar. Doesn't solve the problem with the funny display, because there is a transition and the resize gets triggered before the map is displayed.