Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 谷歌地图不在Iphone上显示,但在iOS模拟器上运行_Swift_Google Maps_Ios Simulator_Swift5 - Fatal编程技术网

Swift 谷歌地图不在Iphone上显示,但在iOS模拟器上运行

Swift 谷歌地图不在Iphone上显示,但在iOS模拟器上运行,swift,google-maps,ios-simulator,swift5,Swift,Google Maps,Ios Simulator,Swift5,这是地图的代码,我可以在iPhone屏幕的左下角看到谷歌图标,也可以得到任何正在搜索但地图未加载的地方的位置 mapView.settings.compassButton = true mapView.isMyLocationEnabled = true mapView.settings.myLocationButton = true mapView.settings.allowScrollGesturesDuringRotateOrZoom = true

这是地图的代码,我可以在iPhone屏幕的左下角看到谷歌图标,也可以得到任何正在搜索但地图未加载的地方的位置

    mapView.settings.compassButton = true
    mapView.isMyLocationEnabled = true
    mapView.settings.myLocationButton = true
    mapView.settings.allowScrollGesturesDuringRotateOrZoom = true
    mapView.animate(toZoom: 11)
    if CLLocationManager.locationServicesEnabled() {
        locationManager.delegate = self
        locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
        locationManager.requestWhenInUseAuthorization()
        //locationManager.startUpdatingLocation()
    }
    let camera = GMSCameraPosition.camera(withLatitude: locationManager.location!.coordinate.latitude, longitude:
          locationManager.location!.coordinate.longitude, zoom: 15);
    self.mapView.camera = camera

你有什么错误吗?