Changed the map setup so it works for resized windows.
Changed the map setup so it can change the window size