5
var camera = GMSCameraPosition.cameraWithLatitude(currentLocation.latitude, longitude: currentLocation.longitude, zoom: 12)
//latitude, longitude like :31.230416 and 121.473701.
let map = GMSMapView(frame: CGRectZero)
map.delegate = self
map.camera = camera
self.view = map
它做工精細!像這樣:
但是,當我創建新的視圖:@IBOutlet weak var mapView: UIView!
然後改變這一行:self.view = map
到self.mapView = map
它不適合我,我得到了一個空白視圖。
偉大的問題和答案。 – JCarlos