I finally figured out what I was doing wrong. After declaring the layout I had to add constraints to the view. After reading Understanding Layout Constraints in the documentation I was able to add the constraints to my user interface:
I had to click on this icon on the bottom right: After that I could add the constraints to the view which holds my map view like this: