我收到此错误:
This application has been blocked by the Google Maps API. This might be because of an incorrectly registered key.
当我尝试设置谷歌地图全景街景时。如果我显示常规 map View ,它会起作用,看起来 key 已正确注册。
我完全按照谷歌文档遵循全景 View 的说明:
import UIKit
import GoogleMaps
class ViewController: UIViewController, GMSMapViewDelegate {
override func loadView() {
let panoView = GMSPanoramaView(frame: .zero)
self.view = panoView
panoView.moveNearCoordinate(CLLocationCoordinate2D(latitude: -33.732, longitude: 150.312))
}
}
有什么想法吗?
最佳答案
对我来说,解决方案是我需要将 Google Cloud Platform 中的项目链接到结算帐户。
一旦我这样做了,街景就开始正常工作了。
标准的 Google map 在没有结算帐户的情况下也能正常工作,这最初让我感到困惑。
关于ios - Google map GMSPanoramaView api 被阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58738962/