Tag: swift3.0.2

Google地图不会显示xcode8.2的新版本

我尝试使用Swift和Xcode 8.2的iOS版Google Maps SDK。 我已经设置了正确的API密钥。 我使用Google Map SDK网站示例代码。 let camera = GMSCameraPosition.cameraWithLatitude(-33.86, longitude: 151.20, zoom: 6) let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera) mapView.myLocationEnabled = true myView = mapView 它会显示错误: 'cameraWithLatitude(_:longitude:zoom :)'已被重命名为'camera(withLitude:longitude:zoom :)' swift:84:47:'CGRectZero'在Swift中不可用 swift:85:17:'myLocationEnabled'已被重命名为'isMyLocationEnabled' 所以我改成如下所示: let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 151.20, zoom: 6) let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera) myView.isMyLocationEnabled = true myView […]