gpt4 book ai didi

ios - Google map SDK iOS 卫星 View

转载 作者:行者123 更新时间:2023-11-29 05:09:31 26 4
gpt4 key购买 nike

如何在我的 iOS 应用程序上获取卫星 View ? Google SDK 网站上的代码不起作用。我正在运行最新版本的 Xcode。

如果我使用 Google SDK 网站上提供的代码,则会收到此错误:

Use of unresolved identifier 'kGMSTypeSatellite'.

我在 Google Developer 网站上使用的代码是:

let camera = GMSCameraPosition.camera(withLatitude: -33.8683, longitude: 151.2086, zoom: 6)
let mapView = GMSMapView.map(withFrame: .zero, camera: camera)
mapView.mapType = kGMSTypeSatellite

谢谢。

最佳答案

您这样调用: mapView.mapType = kGMSTypeSatellite

你应该像这样调用你的mapView

let mapView = GMSMapView.map(withFrame: CGRect.zero, 相机: 相机)
mapView.mapType = GMSMapViewType.satellite
.

关于ios - Google map SDK iOS 卫星 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59817165/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com