Google Maps GMSMapView on custom UIView : <p>I want to display google maps on a view that's then added to <code>self.view</code>, rather than drawing the map directly on <code>self.view</code>. Therefore, I created a view in storyboard and changed its class to <code>GMSMapView</code>. I also created an outlet connection to that view called <code>gmView</code>.  </p>

<p>I am using the following code that does unfortunately not show the map:</p>

<pre><code>let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: GMSCameraPosition.camera(withLatitude: 51.050657, longitude: 10.649514, zoom: 5.5))
gmView = mapView
</code></pre>

<p>Also, I tried adding the <code>mapView</code> to <code>self.view</code> as a subview, like this:</p>

<pre><code>self.view.addSubview(mapView)
</code></pre>

<p>...and inserting it:</p>

<pre><code>self.view.insertSubview(mapView, at: 0)
</code></pre>

<p>Note that I'm using Auto Layout if that changes anything.</p>

<p>None of these approaches seem to work for me.<br>
Any ideas?</p>
