OGeek|极客世界-中国程序员成长平台

标题: ios - 使用 google map sdk for ios 检查 google 街景的可用性 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 22:11
标题: ios - 使用 google map sdk for ios 检查 google 街景的可用性

我正在为 iOS v 2.0.1 使用 Google Maps SDK 使用 GMSPanoramaView 类, 我能够显示点的街景在街景可用的地方,但在街景不可用的坐标处,全景 View 上不会显示任何内容,并且进度指示器一直在旋转。

有没有办法在 objective 中使用 Google Maps SDK for iOS 检查特定坐标附近的 google 街景的可用性c ?



Best Answer-推荐答案


检查某个位置的街景全景图是否存在?您必须使用 GMSPanoramaViewDelegate

- (void) panoramaView:      (GMSPanoramaView *)     view
didMoveToPanorama:      (GMSPanorama *_Nullable)    panorama {
   //If the panorama.panoramaID NSString is null, then the panorama could not be loaded.
}

您也可以在 moveNearCoordinate: 产生错误时调用。

- (void) panoramaView:      (GMSPanoramaView *)     view
error:      (NSError *)     error
onMoveNearCoordinate:       (CLLocationCoordinate2D)    coordinate {
}

希望对您有所帮助...

关于ios - 使用 google map sdk for ios 检查 google 街景的可用性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39632090/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4