如何使用 Aerial View API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Aerial View API 支持两种常规工作流。具体方法取决于您请求的视频是否存在。如果您不确定视频是否存在,应使用 lookupVideoMetadata
确定视频的状态。
生成或检索视频的工作流
使用以下工作流程生成或检索航拍视图视频:
- 检查 Google 是否已使用
lookupVideoMetadata
为该营业地点生成视频。
- 如果不存在视频(
lookupVideoMetadata
返回 404),请调用 renderVideo
以生成新视频。
- 使用
videoId
或地址调用 lookupVideoMetadata
来轮询端点,直到视频的状态为 ACTIVE
。渲染可能需要几个小时,因此请使用指数退避算法来间隔调用。
如果视频处于有效状态(lookupVideoMetadata
返回了 ACTIVE
状态),请调用 lookupVideo
来获取视频的 URI。
此工作流如下图所示:
保存视频 ID 供日后使用
根据 Aerial View API 服务专用条款,Aerial View API 视频 ID 不受 Google Maps Platform 服务条款第 3.2.3(b) 条(“不缓存”)中规定的缓存限制的约束。因此,您可以存储视频 ID 值以供日后使用。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-01-05。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]