【发布时间】:2017-11-16 07:33:37
【问题描述】:
我正在使用 Google 地图,但在 subView 中未正确设置。
我正在使用 swift 3。
@IBOutlet weak var mapSubView: UIView!
var mapView:GMSMapView!
var placesClient: GMSPlacesClient!
我在viewDidLoad中使用了以下代码:
let camera = GMSCameraPosition.camera(withLatitude: 28.616536, longitude: 77.379552, zoom: 12.0)
mapView = GMSMapView.map(withFrame: mapSubView.bounds, camera: camera)
mapSubView.addSubview(mapView)
mapView.delegate = self
self.drawPath()
placesClient = GMSPlacesClient.shared()
我的模拟器截图:
您在谷歌地图附近的右侧看到了空白
还有我故事板的截图:
【问题讨论】:
标签: ios swift swift3 google-maps-sdk-ios