That's not quite it. This map sizing code should still be executed on a window.resize event.