As the map tab is created hidden by default, leaflet seems unable to deal with the sizing properly initially, but we can hook into the "tab changed" event, and tell leaflet to recalculate the size after switching tabs