reogranization for dynamic map resizing when window is resized