I currently have a UIView in my View Controller, which I changed to GMSMapView in Interface Builder, but nothing is displayed, as shown in the image below:

Here is the code I'm using
let lat = 47.07903
let long = -122.961283
let camera = GMSCameraPosition.cameraWithLatitude(lat, longitude: long, zoom: 10)
let map = GMSMapView.mapWithFrame(CGRectZero, camera: camera)
map.myLocationEnabled = true
map.delegate = self
self.mapView.addSubview(map)
let marker = GMSMarker()
marker.position = CLLocationCoordinate2DMake(lat, long)
marker.map = self.mapView
I declared mapViewas such using drag and drop:
@IBOutlet var mapView: GMSMapView!
Any help here would be much appreciated. I tried many different things! Thank!
source
share